mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-02 11:31:00 +00:00
Tidied
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@3938 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
8858a85495
commit
d26f490d1f
1 changed files with 169 additions and 167 deletions
|
@ -134,7 +134,7 @@ static NSMutableDictionary *colorStrings = nil;
|
|||
{
|
||||
NSColor *c;
|
||||
|
||||
c = [[[NSColor alloc] init] autorelease];
|
||||
c = [[[self allocWithZone: NSDefaultMallocZone()] init] autorelease];
|
||||
[c setColorSpaceName: NSCalibratedRGBColorSpace];
|
||||
[c setActiveComponent: GNUSTEP_GUI_HSB_ACTIVE];
|
||||
[c setHue: hue];
|
||||
|
@ -153,7 +153,7 @@ static NSMutableDictionary *colorStrings = nil;
|
|||
{
|
||||
NSColor *c;
|
||||
|
||||
c = [[[NSColor alloc] init] autorelease];
|
||||
c = [[[self allocWithZone: NSDefaultMallocZone()] init] autorelease];
|
||||
[c setColorSpaceName: NSCalibratedRGBColorSpace];
|
||||
[c setActiveComponent: GNUSTEP_GUI_RGB_ACTIVE];
|
||||
[c setRed: red];
|
||||
|
@ -170,7 +170,7 @@ static NSMutableDictionary *colorStrings = nil;
|
|||
{
|
||||
NSColor *c;
|
||||
|
||||
c = [[[NSColor alloc] init] autorelease];
|
||||
c = [[[self allocWithZone: NSDefaultMallocZone()] init] autorelease];
|
||||
[c setColorSpaceName: NSCalibratedWhiteColorSpace];
|
||||
[c setActiveComponent: GNUSTEP_GUI_WHITE_ACTIVE];
|
||||
[c setWhite: white];
|
||||
|
@ -194,7 +194,7 @@ static NSMutableDictionary *colorStrings = nil;
|
|||
{
|
||||
NSColor *c;
|
||||
|
||||
c = [[[NSColor alloc] init] autorelease];
|
||||
c = [[[self allocWithZone: NSDefaultMallocZone()] init] autorelease];
|
||||
[c setColorSpaceName: NSDeviceCMYKColorSpace];
|
||||
[c setActiveComponent: GNUSTEP_GUI_CMYK_ACTIVE];
|
||||
[c setCyan: cyan];
|
||||
|
@ -214,7 +214,7 @@ static NSMutableDictionary *colorStrings = nil;
|
|||
{
|
||||
NSColor *c;
|
||||
|
||||
c = [[[NSColor alloc] init] autorelease];
|
||||
c = [[[self allocWithZone: NSDefaultMallocZone()] init] autorelease];
|
||||
[c setColorSpaceName: NSDeviceRGBColorSpace];
|
||||
[c setActiveComponent: GNUSTEP_GUI_HSB_ACTIVE];
|
||||
[c setHue: hue];
|
||||
|
@ -233,7 +233,7 @@ static NSMutableDictionary *colorStrings = nil;
|
|||
{
|
||||
NSColor *c;
|
||||
|
||||
c = [[[NSColor alloc] init] autorelease];
|
||||
c = [[[self allocWithZone: NSDefaultMallocZone()] init] autorelease];
|
||||
[c setColorSpaceName: NSDeviceRGBColorSpace];
|
||||
[c setActiveComponent: GNUSTEP_GUI_RGB_ACTIVE];
|
||||
[c setRed: red];
|
||||
|
@ -250,7 +250,7 @@ static NSMutableDictionary *colorStrings = nil;
|
|||
{
|
||||
NSColor *c;
|
||||
|
||||
c = [[[NSColor alloc] init] autorelease];
|
||||
c = [[[self allocWithZone: NSDefaultMallocZone()] init] autorelease];
|
||||
[c setColorSpaceName: NSDeviceWhiteColorSpace];
|
||||
[c setActiveComponent: GNUSTEP_GUI_WHITE_ACTIVE];
|
||||
[c setWhite: white];
|
||||
|
@ -270,8 +270,8 @@ static NSMutableDictionary *colorStrings = nil;
|
|||
|
||||
+ (NSColor*) blueColor
|
||||
{
|
||||
return [self colorWithCalibratedRed:0
|
||||
green:0
|
||||
return [self colorWithCalibratedRed: 0.0
|
||||
green: 0.0
|
||||
blue: 1.0
|
||||
alpha: 1.0];
|
||||
}
|
||||
|
@ -287,17 +287,17 @@ static NSMutableDictionary *colorStrings = nil;
|
|||
+ (NSColor*) clearColor
|
||||
{
|
||||
NSColor *c;
|
||||
c = [self colorWithCalibratedRed:0
|
||||
green:1.0
|
||||
blue:1.0
|
||||
alpha:1.0];
|
||||
c = [self colorWithCalibratedRed: 0.0
|
||||
green: 0.0
|
||||
blue: 0.0
|
||||
alpha: 0.0];
|
||||
[c setClear: YES];
|
||||
return c;
|
||||
}
|
||||
|
||||
+ (NSColor*) cyanColor
|
||||
{
|
||||
return [self colorWithCalibratedRed:0
|
||||
return [self colorWithCalibratedRed: 0.0
|
||||
green: 1.0
|
||||
blue: 1.0
|
||||
alpha: 1.0];
|
||||
|
@ -315,9 +315,9 @@ static NSMutableDictionary *colorStrings = nil;
|
|||
|
||||
+ (NSColor*) greenColor
|
||||
{
|
||||
return [self colorWithCalibratedRed:0
|
||||
return [self colorWithCalibratedRed: 0.0
|
||||
green: 1.0
|
||||
blue:0
|
||||
blue: 0.0
|
||||
alpha: 1.0];
|
||||
}
|
||||
|
||||
|
@ -329,7 +329,7 @@ static NSMutableDictionary *colorStrings = nil;
|
|||
+ (NSColor*) magentaColor
|
||||
{
|
||||
return [self colorWithCalibratedRed: 1.0
|
||||
green:0
|
||||
green: 0.0
|
||||
blue: 1.0
|
||||
alpha: 1.0];
|
||||
}
|
||||
|
@ -338,14 +338,14 @@ static NSMutableDictionary *colorStrings = nil;
|
|||
{
|
||||
return [self colorWithCalibratedRed: 1.0
|
||||
green: 0.5
|
||||
blue:0
|
||||
blue: 0.0
|
||||
alpha: 1.0];
|
||||
}
|
||||
|
||||
+ (NSColor*) purpleColor;
|
||||
{
|
||||
return [self colorWithCalibratedRed: 0.5
|
||||
green:0
|
||||
green: 0.0
|
||||
blue: 0.5
|
||||
alpha: 1.0];
|
||||
}
|
||||
|
@ -353,8 +353,8 @@ static NSMutableDictionary *colorStrings = nil;
|
|||
+ (NSColor*) redColor;
|
||||
{
|
||||
return [self colorWithCalibratedRed: 1.0
|
||||
green:0
|
||||
blue:0
|
||||
green: 0.0
|
||||
blue: 0.0
|
||||
alpha: 1.0];
|
||||
}
|
||||
|
||||
|
@ -367,7 +367,7 @@ static NSMutableDictionary *colorStrings = nil;
|
|||
{
|
||||
return [self colorWithCalibratedRed: 1.0
|
||||
green: 1.0
|
||||
blue:0
|
||||
blue: 0.0
|
||||
alpha: 1.0];
|
||||
}
|
||||
|
||||
|
@ -556,7 +556,6 @@ static NSMutableDictionary *colorStrings = nil;
|
|||
{
|
||||
NSColor *color = [systemColors colorWithKey: @"selectedTextColor"];
|
||||
|
||||
//[self colorWithCalibratedRed:.12 green:.12 blue:0 alpha:1.0];
|
||||
if (color == nil)
|
||||
color = [NSColor systemColorWithName: @"selectedTextColor"];
|
||||
return color;
|
||||
|
@ -1042,7 +1041,10 @@ static NSMutableDictionary *colorStrings = nil;
|
|||
// Drawing
|
||||
//
|
||||
- (void) drawSwatchInRect: (NSRect)rect
|
||||
{}
|
||||
{
|
||||
[self set];
|
||||
NSRectFill(rect);
|
||||
}
|
||||
|
||||
- (void) set
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue