git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@6165 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
richard 2000-03-03 06:36:38 +00:00
parent 20ed77e8f9
commit f3e88c07e4

View file

@ -625,14 +625,13 @@ static float GSMenuBarHeight = 25.0; // A wild guess.
// Compute position for popups, if needed // Compute position for popups, if needed
if (selectedItemIndex > -1) if (selectedItemIndex > -1)
{ {
screenRect.origin.y += ([self convertSize: cellSize screenRect.origin.y
toView: nil].height += [self convertSize: cellSize toView: nil].height * selectedItemIndex;
* selectedItemIndex);
} }
// Get the frameRect // Get the frameRect
r = [NSMenuWindow frameRectForContentRect: screenRect r = [NSMenuWindow frameRectForContentRect: screenRect
styleMask: [_window styleMask]]; styleMask: [_window styleMask]];
// Update position,if needed, using the preferredEdge; // Update position,if needed, using the preferredEdge;
// It seems we should be calling [self resizeWindowWithMaxHeight:]; // It seems we should be calling [self resizeWindowWithMaxHeight:];
@ -641,7 +640,7 @@ static float GSMenuBarHeight = 25.0; // A wild guess.
// Set the window frame // Set the window frame
[_window setFrame: r [_window setFrame: r
display: YES]; display: YES];
} }
/* /*
@ -657,11 +656,11 @@ static float GSMenuBarHeight = 25.0; // A wild guess.
// Draw a dark gray line at the left of the menu item cells. // Draw a dark gray line at the left of the menu item cells.
DPSgsave(ctxt); DPSgsave(ctxt);
DPSsetlinewidth(ctxt, 1); DPSsetlinewidth(ctxt, 1);
DPSsetgray(ctxt, 0.333); DPSsetgray(ctxt, 0.333);
DPSmoveto(ctxt, _bounds.origin.x, _bounds.origin.y); DPSmoveto(ctxt, _bounds.origin.x, _bounds.origin.y);
DPSrlineto(ctxt, 0, _bounds.size.height); DPSrlineto(ctxt, 0, _bounds.size.height);
DPSstroke(ctxt); DPSstroke(ctxt);
DPSgrestore(ctxt); DPSgrestore(ctxt);
// Draw the menu cells. // Draw the menu cells.