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:
Doug Simons 2010-05-21 15:01:45 +00:00
parent 70ab53498d
commit 24fad47739
3 changed files with 142 additions and 89 deletions

View file

@ -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];
}