Fixes for NSPopUp.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5380 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
michael 1999-12-03 21:38:43 +00:00
parent c7282de1b4
commit 02d80a510c
6 changed files with 54 additions and 48 deletions

View file

@ -481,9 +481,7 @@ static float GSMenuBarHeight = 25.0; // A wild guess.
accumulatedOffset += neededKeyEquivalentWidth + menuv_horizontalEdgePad;
// Calculate frame size.
#if 0
if (![menuv_menu _isBeholdenToPopUpButton])
#endif
if (![menuv_menu _ownedByPopUp])
cellSize.width = accumulatedOffset + 3; // Add the border width
[self setFrameSize: NSMakeSize(cellSize.width + 1, howHigh)];
@ -491,16 +489,6 @@ static float GSMenuBarHeight = 25.0; // A wild guess.
menuv_needsSizing = NO;
}
- (void) sizeToFitForPopUpButton
{
int howHigh = ([menuv_items_link count] * cellSize.height);
if ([window contentView] == self)
[window setContentSize: NSMakeSize(cellSize.width,howHigh)];
else
[self setFrame: NSMakeRect(0,0,cellSize.width,howHigh)];
}
- (float)stateImageOffset
{
if (menuv_needsSizing)