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:
ericwa 2010-02-01 08:26:40 +00:00
parent feac9a489a
commit 1e62a48e11
5 changed files with 26 additions and 1 deletions

View file

@ -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;

View file

@ -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

View file

@ -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