mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 17:40:36 +00:00
Merge 0.6.6 branch into main.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7188 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
0370b5e398
commit
ceda7aa91c
28 changed files with 728 additions and 709 deletions
|
@ -660,7 +660,7 @@ static NSMutableDictionary *colorStrings = nil;
|
|||
*/
|
||||
if ([colorspace_name isEqualToString: NSCalibratedRGBColorSpace] &&
|
||||
alpha_component == 1.0)
|
||||
return [NSString stringWithFormat: @"\"%f %f %f\"",
|
||||
return [NSString stringWithFormat: @"%f %f %f",
|
||||
RGB_component.red, RGB_component.green, RGB_component.blue];
|
||||
|
||||
/*
|
||||
|
@ -1294,16 +1294,18 @@ static NSMutableDictionary *colorStrings = nil;
|
|||
colorName: col];
|
||||
}
|
||||
}
|
||||
else if (str)
|
||||
else if (str != nil)
|
||||
{
|
||||
const char *ptr = [str cString];
|
||||
float r, g, b;
|
||||
float r, g, b;
|
||||
|
||||
sscanf(ptr, "%f %f %f", &r, &g, &b);
|
||||
return [self colorWithCalibratedRed: r
|
||||
green: g
|
||||
blue: b
|
||||
alpha: 1.0];
|
||||
if (sscanf(ptr, "%f %f %f", &r, &g, &b) == 3)
|
||||
{
|
||||
return [self colorWithCalibratedRed: r
|
||||
green: g
|
||||
blue: b
|
||||
alpha: 1.0];
|
||||
}
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue