Revision: 12594 http://sourceforge.net/p/skim-app/code/12594 Author: hofman Date: 2021-12-01 15:58:08 +0000 (Wed, 01 Dec 2021) Log Message: ----------- Return enum descriptors for system background colors for scripting color
Modified Paths: -------------- trunk/NSColor_SKExtensions.m Modified: trunk/NSColor_SKExtensions.m =================================================================== --- trunk/NSColor_SKExtensions.m 2021-12-01 14:58:13 UTC (rev 12593) +++ trunk/NSColor_SKExtensions.m 2021-12-01 15:58:08 UTC (rev 12594) @@ -255,6 +255,13 @@ - (id)scriptingRgbaColorDescriptor; { + if ([self isEqual:[NSColor underPageBackgroundColor]]) + return [NSAppleEventDescriptor descriptorWithEnumCode:SKScriptingColorUnderPageBackground]; + else if ([self isEqual:[NSColor windowBackgroundColor]]) + return [NSAppleEventDescriptor descriptorWithEnumCode:SKScriptingColorWindowBackground]; + else if ([self isEqual:[NSColor controlBackgroundColor]]) + return [NSAppleEventDescriptor descriptorWithEnumCode:SKScriptingColorControlBackground]; + CGFloat red, green, blue, alpha; [[self colorUsingColorSpaceName:NSCalibratedRGBColorSpace] getRed:&red green:&green blue:&blue alpha:&alpha]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ Skim-app-commit mailing list Skim-app-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/skim-app-commit