mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 15:11:37 +00:00
NSMenuView.m setWindowFrameForAttachingToRect: sizing fixes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16253 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
23049dde9e
commit
e1dd0679b1
2 changed files with 15 additions and 3 deletions
|
@ -1,3 +1,10 @@
|
|||
2003-03-25 Serg Stoyan <stoyan@on.com.ua>
|
||||
|
||||
* Source/NSMenuView.m (setWindowFrameForAttachingToRect:): call sizeToFit
|
||||
only if cell's frame changed (patch by Michael Hanni). Compute frame if number
|
||||
of items > 0 instead of > 1 (fixes size problem when there is 1 item in
|
||||
popup button's menu).
|
||||
|
||||
2003-03-24 Adam Fedor <fedor@gnu.org>
|
||||
|
||||
* Merge from 0.8.5 branch
|
||||
|
|
|
@ -801,16 +801,21 @@ _addLeftBorderOffsetToRect(NSRect aRect)
|
|||
{
|
||||
[_titleView removeFromSuperview];
|
||||
_titleView = nil;
|
||||
_needsSizing = YES;
|
||||
}
|
||||
|
||||
_cellSize = cellFrame.size;
|
||||
[self sizeToFit];
|
||||
// Only call sizeToFit if needed.
|
||||
if ((NSEqualSizes(_cellSize, cellFrame.size) == NO) || _needsSizing)
|
||||
{
|
||||
_cellSize = cellFrame.size;
|
||||
[self sizeToFit];
|
||||
}
|
||||
|
||||
/*
|
||||
* Compute the frame
|
||||
*/
|
||||
screenFrame = screenRect;
|
||||
if (items > 1)
|
||||
if (items > 0)
|
||||
{
|
||||
float f;
|
||||
|
||||
|
|
Loading…
Reference in a new issue