mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 07:00:46 +00:00
* Headers/Additions/GNUstepGUI/GSTheme.h:
* Source/GSThemeDrawing.m: * Source/NSPopUpButtonCell.m: Remove -[GSTheme drawBorderAndBackgroundForPopUpButtonCell: withFrame:inView:state:] which I added recently, and just use -[GSTheme drawButton:in:view:style:state]. This way, NSPopUpButtonCell automatically supports all of the different NSBezelStyles. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@37202 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d651b3154c
commit
69acbb22b1
4 changed files with 19 additions and 34 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
2013-10-07 Eric Wasylishen <ewasylishen@gmail.com>
|
||||
|
||||
* Headers/Additions/GNUstepGUI/GSTheme.h:
|
||||
* Source/GSThemeDrawing.m:
|
||||
* Source/NSPopUpButtonCell.m:
|
||||
Remove -[GSTheme drawBorderAndBackgroundForPopUpButtonCell:
|
||||
withFrame:inView:state:] which I added recently, and just use
|
||||
-[GSTheme drawButton:in:view:style:state]. This way,
|
||||
NSPopUpButtonCell automatically supports all of the different
|
||||
NSBezelStyles.
|
||||
|
||||
2013-10-07 Eric Wasylishen <ewasylishen@gmail.com>
|
||||
|
||||
* Source/GSTitleView.m: Use the GSTheme
|
||||
|
|
|
@ -1010,11 +1010,6 @@ APPKIT_EXPORT NSString *GSThemeWillDeactivateNotification;
|
|||
state: (GSThemeControlState)state
|
||||
isHorizontal: (BOOL)isHorizontal;
|
||||
|
||||
- (void) drawBorderAndBackgroundForPopUpButtonCell: (NSPopUpButtonCell *)cell
|
||||
withFrame: (NSRect)cellFrame
|
||||
inView: (NSView *)controlView
|
||||
state: (GSThemeControlState)state;
|
||||
|
||||
/**
|
||||
* <p>Draws the menu item title.</p>
|
||||
*
|
||||
|
|
|
@ -1053,28 +1053,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
- (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"
|
||||
|
|
|
@ -1057,17 +1057,18 @@ static NSImage *_pbc_image[5];
|
|||
}
|
||||
|
||||
/*
|
||||
* Override the implementation in NSMenuItemCell to call a different
|
||||
* GSTheme method, since typically menu items and buttons will be
|
||||
* drawn differently (though not in the GNUstep default theme).
|
||||
* Override the implementation in NSMenuItemCell to behave the same
|
||||
* as superclass NSButtonCell's implementation, since our direct
|
||||
* superclass NSMenuItemCell has special menu-specific drawing.
|
||||
*/
|
||||
- (void) drawBorderAndBackgroundWithFrame: (NSRect)cellFrame
|
||||
inView: (NSView *)controlView
|
||||
{
|
||||
[[GSTheme theme] drawBorderAndBackgroundForPopUpButtonCell: self
|
||||
withFrame: cellFrame
|
||||
inView: controlView
|
||||
state: [self themeControlState]];
|
||||
[[GSTheme theme] drawButton: cellFrame
|
||||
in: self
|
||||
view: controlView
|
||||
style: _bezel_style
|
||||
state: [self themeControlState]];
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue