mirror of
https://github.com/gnustep/apps-projectcenter.git
synced 2025-03-17 08:01:24 +00:00
Convert CMYK to RGB before serializing
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38423 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
cb8e9ca4d7
commit
56f365b1a0
2 changed files with 13 additions and 21 deletions
|
@ -1,3 +1,8 @@
|
|||
2015-03-22 Riccardo Mottola <rm@gnu.org>
|
||||
|
||||
* Modules/Preferences/EditorFSC/PCEditorFSCPrefs.m
|
||||
Convert CMYK to RGB before serializing.
|
||||
|
||||
2015-03-22 Riccardo Mottola <rm@gnu.org>
|
||||
|
||||
* Modules/Editors/ProjectCenter/PCEditor.m
|
||||
|
|
|
@ -243,7 +243,6 @@
|
|||
- (void)setEditorColor:(id)sender
|
||||
{
|
||||
NSColor *color;
|
||||
NSColor *currentColor;
|
||||
NSString *colorString;
|
||||
NSString *key;
|
||||
NSString *colorSpaceName;
|
||||
|
@ -252,50 +251,38 @@
|
|||
{
|
||||
NSLog(@"foregroundColorWell");
|
||||
color = [foregroundColorWell color];
|
||||
currentColor = currentForegroundColor;
|
||||
key = EditorForegroundColor;
|
||||
}
|
||||
else if (sender == backgroundColorWell)
|
||||
{
|
||||
NSLog(@"backgroundColorWell");
|
||||
color = [backgroundColorWell color];
|
||||
currentColor = currentBackgroundColor;
|
||||
key = EditorBackgroundColor;
|
||||
}
|
||||
else // selectionColorWell
|
||||
{
|
||||
NSLog(@"selectionColorWell");
|
||||
color = [selectionColorWell color];
|
||||
currentColor = currentSelectionColor;
|
||||
key = EditorSelectionColor;
|
||||
}
|
||||
|
||||
colorSpaceName = [color colorSpaceName];
|
||||
NSLog(@"Color's colorspace name: '%@'", colorSpaceName);
|
||||
if ([colorSpaceName isEqualToString:@"NSCalibratedRGBColorSpace"])
|
||||
{
|
||||
/* [sender setColor:currentColor];
|
||||
NSRunAlertPanel(@"Set Color",
|
||||
@"Please, use RGB color.\n"
|
||||
@"Color in color well left unchanged",
|
||||
@"Close", nil, nil);*/
|
||||
colorString = [NSString stringWithFormat:@"RGB %0.1f %0.1f %0.1f",
|
||||
[color redComponent],
|
||||
[color greenComponent],
|
||||
[color blueComponent]];
|
||||
}
|
||||
else if ([colorSpaceName isEqualToString:@"NSCalibratedWhiteColorSpace"])
|
||||
|
||||
if ([colorSpaceName isEqualToString:@"NSCalibratedWhiteColorSpace"])
|
||||
{
|
||||
colorString = [NSString stringWithFormat:@"White %0.1f",
|
||||
[color whiteComponent]];
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
if (![colorSpaceName isEqualToString:NSCalibratedRGBColorSpace])
|
||||
color = [color colorUsingColorSpaceName:NSCalibratedRGBColorSpace];
|
||||
colorString = [NSString stringWithFormat:@"RGB %0.1f %0.1f %0.1f",
|
||||
[color redComponent],
|
||||
[color greenComponent],
|
||||
[color blueComponent]];
|
||||
}
|
||||
|
||||
currentColor = color;
|
||||
|
||||
NSLog(@"Selected color: '%@'", colorString);
|
||||
|
||||
[prefs setString:colorString forKey:key notify:YES];
|
||||
|
|
Loading…
Reference in a new issue