* Headers/Additions/GNUstepGUI/GSTheme.h:

* Source/GSTheme.m:
* Source/GSThemeDrawing.m:
* Source/NSPopUpButtonCell.m: Add a theme part GSPopUpButton
so NSPopUpButtonCell can be drawn with a different background
than NSMenuItemCell.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@37183 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Eric Wasylishen 2013-10-02 23:56:16 +00:00
parent ea8ded398f
commit dfab5c6196
5 changed files with 65 additions and 0 deletions

View file

@ -44,6 +44,7 @@
#import "AppKit/NSMenuView.h"
#import "AppKit/NSMenuItemCell.h"
#import "AppKit/NSParagraphStyle.h"
#import "AppKit/NSPopUpButtonCell.h"
#import "AppKit/NSProgressIndicator.h"
#import "AppKit/NSScroller.h"
#import "AppKit/NSScrollView.h"
@ -1000,6 +1001,28 @@
}
}
- (void) drawBorderAndBackgroundForPopUpButtonCell: (NSPopUpButtonCell *)cell
withFrame: (NSRect)cellFrame
inView: (NSView *)controlView
state: (GSThemeControlState)state
{
GSDrawTiles *tiles = [self tilesNamed: GSPopUpButton state: state];
if (tiles == nil)
{
[self drawBorderAndBackgroundForMenuItemCell: cell
withFrame: cellFrame
inView: controlView
state: state
isHorizontal: NO];
}
else
{
[self fillRect: cellFrame
withTiles: tiles
background: [NSColor clearColor]];
}
}
- (NSColor *) menuSeparatorColor
{
NSColor *color = [self colorNamed: @"menuSeparatorColor"