mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-29 22:47:39 +00:00
Make toolbar resizing behavior match the Cocoa behavior
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30440 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
70ab53498d
commit
24fad47739
3 changed files with 142 additions and 89 deletions
|
@ -619,9 +619,10 @@ NSString *GSMovableToolbarItemPboardType = @"GSMovableToolbarItemPboardType";
|
|||
|
||||
[(id)view sizeToFit];
|
||||
newSize = [view frame].size;
|
||||
if (newSize.width < minSize.width || newSize.height < minSize.height)
|
||||
if (minSize.width > 0 || newSize.height < minSize.height)
|
||||
{
|
||||
newSize.width = MAX(newSize.width, minSize.width);
|
||||
if (minSize.width > 0)
|
||||
newSize.width = minSize.width;
|
||||
newSize.height = MAX(newSize.height, minSize.height);
|
||||
[view setFrameSize: newSize];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue