mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 16:20:46 +00:00
Fix a regression where a window's content view was improperly resized
when toggleToolbarShown: makes its toolbar visible again. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30319 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
da1abbdb04
commit
0ea019f35f
2 changed files with 25 additions and 22 deletions
|
@ -1,3 +1,9 @@
|
|||
2010-05-07 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||
|
||||
* Source/GSWindowDecorationView.m (-layout): Fix a regression
|
||||
where a window's content view was improperly resized when
|
||||
toggleToolbarShown: makes its toolbar visible again.
|
||||
|
||||
2010-05-02 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Headers/AppKit/NSSavePanel.h,
|
||||
|
|
|
@ -252,33 +252,30 @@
|
|||
contentViewFrame.size.height -= menuBarHeight;
|
||||
}
|
||||
|
||||
if(hasToolbar)
|
||||
if (hasToolbar)
|
||||
{
|
||||
if ([tb isVisible])
|
||||
{
|
||||
GSToolbarView *tv = [tb _toolbarView];
|
||||
float newToolbarViewHeight;
|
||||
GSToolbarView *tv = [tb _toolbarView];
|
||||
float newToolbarViewHeight;
|
||||
|
||||
// If the width changed we may need to recalculate the height
|
||||
if (contentViewFrame.size.width != [tv frame].size.width)
|
||||
{
|
||||
[tv setFrameSize: NSMakeSize(contentViewFrame.size.width, 100)];
|
||||
// Will recalculate the layout
|
||||
[tv _reload];
|
||||
}
|
||||
newToolbarViewHeight = [tv _heightFromLayout];
|
||||
[tv setFrame: NSMakeRect(
|
||||
contentViewFrame.origin.x,
|
||||
NSMaxY(contentViewFrame) - newToolbarViewHeight,
|
||||
contentViewFrame.size.width,
|
||||
newToolbarViewHeight)];
|
||||
contentViewFrame.size.height -= newToolbarViewHeight;
|
||||
// If the width changed we may need to recalculate the height
|
||||
if (contentViewFrame.size.width != [tv frame].size.width)
|
||||
{
|
||||
[tv setFrameSize: NSMakeSize(contentViewFrame.size.width, 100)];
|
||||
// Will recalculate the layout
|
||||
[tv _reload];
|
||||
}
|
||||
newToolbarViewHeight = [tv _heightFromLayout];
|
||||
[tv setFrame: NSMakeRect(contentViewFrame.origin.x,
|
||||
NSMaxY(contentViewFrame) - newToolbarViewHeight,
|
||||
contentViewFrame.size.width,
|
||||
newToolbarViewHeight)];
|
||||
contentViewFrame.size.height -= newToolbarViewHeight;
|
||||
}
|
||||
|
||||
if ([windowContentView superview] == self)
|
||||
{
|
||||
[windowContentView setFrame:contentViewFrame];
|
||||
}
|
||||
[windowContentView setFrame:contentViewFrame];
|
||||
}
|
||||
}
|
||||
|
||||
- (void) changeWindowHeight: (float)difference
|
||||
|
@ -398,7 +395,7 @@
|
|||
|
||||
// take in account of the menubar when calculating the origin
|
||||
contentYOrigin = NSMaxY(contentRect);
|
||||
if(hasMenu)
|
||||
if (hasMenu)
|
||||
{
|
||||
float menuBarHeight = [[GSTheme theme] menuHeightForWindow: _window];
|
||||
contentYOrigin -= menuBarHeight;
|
||||
|
|
Loading…
Reference in a new issue