mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 13:00: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
ceb2323c0b
commit
219f322e53
2 changed files with 15 additions and 3 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue