mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 10:01:14 +00:00
Do not display the key equivalent if owned by a popup, and drawing the
popup small image on the right git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15883 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a195a99103
commit
5b0ab5a678
1 changed files with 19 additions and 2 deletions
|
@ -430,10 +430,27 @@ static NSImage *arrowImageH = nil;
|
|||
[imageToDraw setBackgroundColor: _backgroundColor];
|
||||
[imageToDraw compositeToPoint: position operation: NSCompositeSourceOver];
|
||||
}
|
||||
else
|
||||
[self _drawText: [_menuItem keyEquivalent] inFrame: cellFrame];
|
||||
/* FIXME/TODO here - decide a consistent policy for images.
|
||||
*
|
||||
* The reason of the following code is that we draw the key
|
||||
* equivalent, but not if we are a popup button and are displaying
|
||||
* an image (the image is displayed in the title or selected entry
|
||||
* in the popup, it's the small square on the right). In that case,
|
||||
* the image will be drawn in the same position where the key
|
||||
* equivalent would be, so we do not display the key equivalent,
|
||||
* else they would be displayed one over the other one.
|
||||
*/
|
||||
else if (![[_menuView menu] _ownedByPopUp])
|
||||
{
|
||||
[self _drawText: [_menuItem keyEquivalent] inFrame: cellFrame];
|
||||
}
|
||||
else if (_imageToDisplay == nil)
|
||||
{
|
||||
[self _drawText: [_menuItem keyEquivalent] inFrame: cellFrame];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
- (void) drawSeparatorItemWithFrame:(NSRect)cellFrame
|
||||
inView:(NSView *)controlView
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue