From 467edcbeefa55b086d6bb660715ff348ccf12b01 Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Fri, 4 Oct 2013 00:50:45 +0000 Subject: [PATCH] * Source/NSMenuItemCell.m: If the cell is highlighted, draw the arrow using NSHighlightedMenuArrow (if available). git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@37192 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 5 +++++ Source/NSMenuItemCell.m | 12 +++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ee105717e..de3b9ed59 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-10-03 Eric Wasylishen + + * Source/NSMenuItemCell.m: If the cell is highlighted, draw + the arrow using NSHighlightedMenuArrow (if available). + 2013-10-03 Eric Wasylishen * Source/GSThemeDrawing.m: Use new -[GSDrawTiles themeMargins] diff --git a/Source/NSMenuItemCell.m b/Source/NSMenuItemCell.m index 1686d9125..bd4692747 100644 --- a/Source/NSMenuItemCell.m +++ b/Source/NSMenuItemCell.m @@ -726,7 +726,17 @@ static NSString *commandKeyString = @"#"; - (void) drawKeyEquivalentWithFrame: (NSRect)cellFrame inView: (NSView *)controlView { - NSImage *arrow = [NSImage imageNamed: @"NSMenuArrow"]; + NSImage *arrow = nil; + if (_cell.is_highlighted) + { + arrow = [NSImage imageNamed: @"NSHighlightedMenuArrow"]; + } + + if (arrow == nil) + { + arrow = [NSImage imageNamed: @"NSMenuArrow"]; + } + cellFrame = [self keyEquivalentRectForBounds: cellFrame];