diff --git a/English.lproj/PBRemoteProgressSheet.xib b/English.lproj/PBRemoteProgressSheet.xib index ca616cf..bf780a8 100644 --- a/English.lproj/PBRemoteProgressSheet.xib +++ b/English.lproj/PBRemoteProgressSheet.xib @@ -2,13 +2,13 @@ 1050 - 10C540 - 740 - 1038.25 - 458.00 + 10F569 + 788 + 1038.29 + 461.00 com.apple.InterfaceBuilder.CocoaPlugin - 740 + 788 YES @@ -41,12 +41,12 @@ 1 2 - {{196, 408}, {397, 102}} + {{196, 417}, {397, 93}} 544736256 Window NSWindow - {3.40282e+38, 3.40282e+38} + {1.79769e+308, 1.79769e+308} 274 @@ -56,7 +56,7 @@ 1314 - {{23, 24}, {351, 20}} + {{18, 16}, {361, 20}} 16394 100 @@ -64,7 +64,7 @@ 274 - {{17, 52}, {363, 30}} + {{17, 56}, {363, 17}} YES @@ -83,7 +83,7 @@ controlColor 3 - MC42NjY2NjY2ODY1AA + MC42NjY2NjY2NjY3AA @@ -98,11 +98,11 @@ - {397, 102} + {397, 93} {{0, 0}, {1680, 1028}} - {3.40282e+38, 3.40282e+38} + {1.79769e+308, 1.79769e+308} @@ -220,9 +220,9 @@ YES - {{814, 826}, {397, 102}} + {{814, 835}, {397, 93}} com.apple.InterfaceBuilder.CocoaPlugin - {{814, 826}, {397, 102}} + {{814, 835}, {397, 93}} {196, 240} {{202, 428}, {480, 270}} @@ -271,6 +271,25 @@ NSProgressIndicator + + YES + + YES + progressDescription + progressIndicator + + + YES + + progressDescription + NSTextField + + + progressIndicator + NSProgressIndicator + + + IBProjectSource PBRemoteProgressSheet.h @@ -833,6 +852,13 @@ showWindow: id + + showWindow: + + showWindow: + id + + IBFrameworkSource AppKit.framework/Headers/NSWindowController.h @@ -841,6 +867,7 @@ 0 + IBCocoaFramework com.apple.InterfaceBuilder.CocoaPlugin.macosx diff --git a/PBRemoteProgressSheet.m b/PBRemoteProgressSheet.m index 77b250e..74866f2 100644 --- a/PBRemoteProgressSheet.m +++ b/PBRemoteProgressSheet.m @@ -73,7 +73,21 @@ NSString * const kGitXProgressErrorInfo = @"PBGitXProgressErrorInfo"; description = theDescription; [self window]; // loads the window (if it wasn't already) + + // resize window if the description is larger than the default text field + NSRect originalFrame = [self.progressDescription frame]; [self.progressDescription setStringValue:[self progressTitle]]; + NSAttributedString *attributedTitle = [self.progressDescription attributedStringValue]; + NSSize boundingSize = originalFrame.size; + boundingSize.height = 0.0f; + NSRect boundingRect = [attributedTitle boundingRectWithSize:boundingSize options:NSStringDrawingUsesLineFragmentOrigin]; + CGFloat heightDelta = boundingRect.size.height - originalFrame.size.height; + if (heightDelta > 0.0f) { + NSRect windowFrame = [[self window] frame]; + windowFrame.size.height += heightDelta; + [[self window] setFrame:windowFrame display:NO]; + } + [self.progressIndicator startAnimation:nil]; [NSApp beginSheet:[self window] modalForWindow:[controller window] modalDelegate:self didEndSelector:nil contextInfo:nil];