New system colour methods.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@20789 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
FredKiefer 2005-02-24 01:06:13 +00:00
parent 381013343b
commit af47cf9378
3 changed files with 45 additions and 1 deletions

View file

@ -186,7 +186,7 @@ void initSystemColors(void)
colorStrings = [[NSMutableDictionary alloc]
initWithObjectsAndKeys:
lightGray, @"controlBackgroundColor",
lightGray, @"controlBackgroundColor",
lightGray, @"controlColor",
lightGray, @"controlHighlightColor",
white, @"controlLightHighlightColor",
@ -214,6 +214,11 @@ void initSystemColors(void)
lightGray, @"windowBackgroundColor",
black, @"windowFrameColor",
white, @"windowFrameTextColor",
black, @"alternateSelectedControlColor",
white, @"alternateSelectedControlTextColor",
white, @"rowBackgroundColor",
lightGray, @"alternateRowBackgroundColor",
lightGray, @"secondarySelectedControlColor",
//gray, @"windowFrameColor",
//black, @"windowFrameTextColor",
nil];
@ -573,6 +578,16 @@ systemColorWithName(NSString *name)
//
// System colors stuff.
//
+ (NSColor*) alternateSelectedControlColor
{
return systemColorWithName(@"alternateSelectedControlColor");
}
+ (NSColor*) alternateSelectedControlTextColor
{
return systemColorWithName(@"alternateSelectedControlTextColor");
}
+ (NSColor*) controlBackgroundColor
{
return systemColorWithName(@"controlBackgroundColor");
@ -648,6 +663,11 @@ systemColorWithName(NSString *name)
return systemColorWithName(@"scrollBarColor");
}
+ (NSColor*) secondarySelectedControlColor
{
return systemColorWithName(@"secondarySelectedControlColor");
}
+ (NSColor*) selectedControlColor
{
return systemColorWithName(@"selectedControlColor");
@ -713,6 +733,12 @@ systemColorWithName(NSString *name)
return systemColorWithName(@"windowFrameTextColor");
}
+ (NSArray*) controlAlternatingRowBackgroundColors
{
return [NSArray arrayWithObjects: systemColorWithName(@"rowBackgroundColor"),
systemColorWithName(@"alternateRowBackgroundColor"), nil];
}
////////////////////////////////////////////////////////////
//
// Instance methods