mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-26 17:01:22 +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
703f72ff3c
commit
cb7205389d
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>
|
2013-10-07 Eric Wasylishen <ewasylishen@gmail.com>
|
||||||
|
|
||||||
* Source/GSTitleView.m: Use the GSTheme
|
* Source/GSTitleView.m: Use the GSTheme
|
||||||
|
|
|
@ -1010,11 +1010,6 @@ APPKIT_EXPORT NSString *GSThemeWillDeactivateNotification;
|
||||||
state: (GSThemeControlState)state
|
state: (GSThemeControlState)state
|
||||||
isHorizontal: (BOOL)isHorizontal;
|
isHorizontal: (BOOL)isHorizontal;
|
||||||
|
|
||||||
- (void) drawBorderAndBackgroundForPopUpButtonCell: (NSPopUpButtonCell *)cell
|
|
||||||
withFrame: (NSRect)cellFrame
|
|
||||||
inView: (NSView *)controlView
|
|
||||||
state: (GSThemeControlState)state;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>Draws the menu item title.</p>
|
* <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 *) menuSeparatorColor
|
||||||
{
|
{
|
||||||
NSColor *color = [self colorNamed: @"menuSeparatorColor"
|
NSColor *color = [self colorNamed: @"menuSeparatorColor"
|
||||||
|
|
|
@ -1057,16 +1057,17 @@ static NSImage *_pbc_image[5];
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Override the implementation in NSMenuItemCell to call a different
|
* Override the implementation in NSMenuItemCell to behave the same
|
||||||
* GSTheme method, since typically menu items and buttons will be
|
* as superclass NSButtonCell's implementation, since our direct
|
||||||
* drawn differently (though not in the GNUstep default theme).
|
* superclass NSMenuItemCell has special menu-specific drawing.
|
||||||
*/
|
*/
|
||||||
- (void) drawBorderAndBackgroundWithFrame: (NSRect)cellFrame
|
- (void) drawBorderAndBackgroundWithFrame: (NSRect)cellFrame
|
||||||
inView: (NSView *)controlView
|
inView: (NSView *)controlView
|
||||||
{
|
{
|
||||||
[[GSTheme theme] drawBorderAndBackgroundForPopUpButtonCell: self
|
[[GSTheme theme] drawButton: cellFrame
|
||||||
withFrame: cellFrame
|
in: self
|
||||||
inView: controlView
|
view: controlView
|
||||||
|
style: _bezel_style
|
||||||
state: [self themeControlState]];
|
state: [self themeControlState]];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue