mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 06:40:38 +00:00
theming cleanups
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29024 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
73f0d0ca88
commit
09c902f201
5 changed files with 55 additions and 41 deletions
|
@ -682,33 +682,13 @@
|
|||
}
|
||||
}
|
||||
|
||||
- (NSImage *) arrowImageForMenuItemCell
|
||||
{
|
||||
return [NSImage imageNamed: @"NSMenuArrow"];
|
||||
}
|
||||
|
||||
// menu item cell drawing methods
|
||||
- (NSColor *) backgroundColorForMenuItemCell: (NSMenuItemCell *)cell
|
||||
state: (GSThemeControlState)state
|
||||
{
|
||||
if ((state == GSThemeHighlightedState) || (state == GSThemeSelectedState))
|
||||
{
|
||||
return [NSColor selectedMenuItemColor];
|
||||
}
|
||||
else
|
||||
{
|
||||
return [NSColor controlBackgroundColor];
|
||||
}
|
||||
}
|
||||
|
||||
- (void) drawBorderAndBackgroundForMenuItemCell: (NSMenuItemCell *)cell
|
||||
withFrame: (NSRect)cellFrame
|
||||
inView: (NSView *)controlView
|
||||
state: (GSThemeControlState)state
|
||||
isHorizontal: (BOOL)isHorizontal
|
||||
{
|
||||
NSColor *backgroundColor = [self backgroundColorForMenuItemCell: cell
|
||||
state: state];
|
||||
NSColor *backgroundColor = [cell backgroundColor];
|
||||
|
||||
if (isHorizontal)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue