diff options
author | stuartmorgan <stuartmorgan@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2009-08-28 22:08:34 +0000 |
---|---|---|
committer | stuartmorgan <stuartmorgan@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2009-08-28 22:08:34 +0000 |
commit | ddd71b75f7a61260a83da057b5642499db0713ee (patch) | |
tree | 431ba60f5ced1b7096827bebeedb82c09991c53f | |
parent | Provide a real std::string hash, not just a forward declaration for something (diff) | |
download | breakpad-ddd71b75f7a61260a83da057b5642499db0713ee.tar.xz |
Fix text field resizing for 10.5+ SDK
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@392 4c0a9323-5329-0410-9bdc-e9ce6186880e
-rw-r--r-- | src/client/mac/sender/crash_report_sender.m | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/client/mac/sender/crash_report_sender.m b/src/client/mac/sender/crash_report_sender.m index 31c35fe5..0cdeb676 100644 --- a/src/client/mac/sender/crash_report_sender.m +++ b/src/client/mac/sender/crash_report_sender.m @@ -112,9 +112,12 @@ NSString *const kDefaultServerType = @"google"; @implementation NSTextField (ResizabilityExtentions) - (float)breakpad_adjustHeightToFit { NSRect oldFrame = [self frame]; + // Starting with the 10.5 SDK, height won't grow, so make it huge to start. + NSRect presizeFrame = oldFrame; + presizeFrame.size.height = MAXFLOAT; // sizeToFit will blow out the width rather than making the field taller, so // we do it manually. - NSSize newSize = [[self cell] cellSizeForBounds:oldFrame]; + NSSize newSize = [[self cell] cellSizeForBounds:presizeFrame]; NSRect newFrame = NSMakeRect(oldFrame.origin.x, oldFrame.origin.y, NSWidth(oldFrame), newSize.height); [self setFrame:newFrame]; |