mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 19:01:15 +00:00
fixed problem with saved window size growing when toolbar is visible
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/testplant_1@29084 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d5241a56ca
commit
48d11d63e6
1 changed files with 16 additions and 0 deletions
|
@ -4453,6 +4453,14 @@ current key view.<br />
|
|||
}
|
||||
fRect.size.height = value;
|
||||
|
||||
// if toolbar is showing, adjust saved frame to add the toolbar back in
|
||||
if ([_toolbar isVisible])
|
||||
{
|
||||
int toolbarHeight = [[_toolbar _toolbarView] frame].size.height;
|
||||
fRect.size.height += toolbarHeight;
|
||||
fRect.origin.y -= toolbarHeight;
|
||||
}
|
||||
|
||||
/*
|
||||
* Scan in the frame for the area the window was placed in in screen.
|
||||
*/
|
||||
|
@ -4564,6 +4572,14 @@ current key view.<br />
|
|||
|
||||
fRect = _frame;
|
||||
|
||||
// if toolbar is showing, adjust saved frame to not include the toolbar
|
||||
if ([_toolbar isVisible])
|
||||
{
|
||||
int toolbarHeight = [[_toolbar _toolbarView] frame].size.height;
|
||||
fRect.size.height -= toolbarHeight;
|
||||
fRect.origin.y += toolbarHeight;
|
||||
}
|
||||
|
||||
/*
|
||||
* The screen rectangle should gives the area of the screen in which
|
||||
* the window could be placed (ie a rectangle excluding the dock).
|
||||
|
|
Loading…
Reference in a new issue