mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 00:31:03 +00:00
Add GSThemeDisabledState
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29455 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
feac9a489a
commit
1e62a48e11
5 changed files with 26 additions and 1 deletions
|
@ -1287,6 +1287,9 @@ typedef struct {
|
|||
case GSThemeNormalState:
|
||||
fullName = aName;
|
||||
break;
|
||||
case GSThemeDisabledState:
|
||||
fullName = [aName stringByAppendingString: @"Disabled"];
|
||||
break;
|
||||
case GSThemeHighlightedState:
|
||||
fullName = [aName stringByAppendingString: @"Highlighted"];
|
||||
break;
|
||||
|
|
|
@ -80,6 +80,10 @@
|
|||
{
|
||||
color = [NSColor selectedControlColor];
|
||||
}
|
||||
else
|
||||
{
|
||||
color = [NSColor controlBackgroundColor];
|
||||
}
|
||||
}
|
||||
|
||||
tiles = [self tilesNamed: name state: state];
|
||||
|
@ -141,6 +145,10 @@
|
|||
{
|
||||
[self drawGrayBezel: frame withClip: NSZeroRect];
|
||||
}
|
||||
else
|
||||
{
|
||||
[self drawButton: frame withClip: NSZeroRect];
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -910,6 +910,11 @@ typedef struct _GSButtonCellFlags
|
|||
buttonState = GSThemeSelectedState;
|
||||
}
|
||||
|
||||
if (_cell.is_disabled && buttonState != GSThemeHighlightedState)
|
||||
{
|
||||
buttonState = GSThemeDisabledState;
|
||||
}
|
||||
|
||||
[[GSTheme theme] drawButton: cellFrame
|
||||
in: self
|
||||
view: controlView
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue