From ddd71b75f7a61260a83da057b5642499db0713ee Mon Sep 17 00:00:00 2001 From: stuartmorgan Date: Fri, 28 Aug 2009 22:08:34 +0000 Subject: Fix text field resizing for 10.5+ SDK git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@392 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/client/mac/sender/crash_report_sender.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') 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]; -- cgit v1.2.1