зеркало из https://github.com/mozilla/pjs.git
set a min-size when user clicks maximize button (bug 187164)
This commit is contained in:
Родитель
24f062a3f2
Коммит
50bbab0018
|
@ -5,7 +5,7 @@
|
|||
<key>IBDocumentLocation</key>
|
||||
<string>24 42 592 284 0 0 1600 1002 </string>
|
||||
<key>IBFramework Version</key>
|
||||
<string>349.0</string>
|
||||
<string>362.0</string>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>121</integer>
|
||||
|
|
Двоичные данные
camino/resources/localized/English.lproj/ProgressDialog.nib/objects.nib
сгенерированный
Двоичные данные
camino/resources/localized/English.lproj/ProgressDialog.nib/objects.nib
сгенерированный
Двоичный файл не отображается.
|
@ -646,20 +646,24 @@ static id gSharedProgressController = nil;
|
|||
|
||||
#pragma mark -
|
||||
|
||||
// implement to zoom to a size that just fits the contents
|
||||
// zoom to fit contents, but don't go under minimum size
|
||||
-(NSRect)windowWillUseStandardFrame:(NSWindow *)sender defaultFrame:(NSRect)defaultFrame
|
||||
{
|
||||
NSSize scrollFrameSize = [NSScrollView frameSizeForContentSize:[mStackView bounds].size
|
||||
hasHorizontalScroller:NO hasVerticalScroller:YES borderType:NSNoBorder];
|
||||
|
||||
NSSize curScrollFrameSize = [mScrollView frame].size;
|
||||
float frameDelta = (scrollFrameSize.height - curScrollFrameSize.height);
|
||||
|
||||
NSRect windowFrame = [[self window] frame];
|
||||
windowFrame.size.height += frameDelta;
|
||||
windowFrame.origin.y -= frameDelta; // maintain top
|
||||
NSSize curScrollFrameSize = [mScrollView frame].size;
|
||||
NSSize scrollFrameSize = [NSScrollView frameSizeForContentSize:[mStackView bounds].size
|
||||
hasHorizontalScroller:NO hasVerticalScroller:YES borderType:NSNoBorder];
|
||||
float frameDelta = (curScrollFrameSize.height - scrollFrameSize.height);
|
||||
|
||||
// don't get vertically smaller than the default window size
|
||||
if ((windowFrame.size.height - frameDelta) < mDefaultWindowSize.height) {
|
||||
frameDelta = windowFrame.size.height - mDefaultWindowSize.height;
|
||||
}
|
||||
|
||||
windowFrame.size.height -= frameDelta;
|
||||
windowFrame.origin.y += frameDelta; // maintain top
|
||||
windowFrame.size.width = mDefaultWindowSize.width;
|
||||
|
||||
// cocoa will ensure that the window fits onscreen for us
|
||||
return windowFrame;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче