Revision: 13045 http://sourceforge.net/p/skim-app/code/13045 Author: hofman Date: 2022-07-23 22:53:16 +0000 (Sat, 23 Jul 2022) Log Message: ----------- make invert colors in dark mode accessible by scripting
Modified Paths: -------------- trunk/SKDisplayPrefs.h trunk/SKDisplayPrefs.m trunk/Skim.sdef Modified: trunk/SKDisplayPrefs.h =================================================================== --- trunk/SKDisplayPrefs.h 2022-07-21 09:37:03 UTC (rev 13044) +++ trunk/SKDisplayPrefs.h 2022-07-23 22:53:16 UTC (rev 13045) @@ -47,6 +47,7 @@ @property (nonatomic, retain) NSDictionary *pdfViewSettings; @property (nonatomic, retain) NSColor *backgroundColor; @property (nonatomic) CGFloat sepiaTone; +@property (nonatomic, getter=isInverted) BOOL inverted; - (id)initForFullScreen:(BOOL)isFullScreen; - (id)initWithName:(NSString *)name; Modified: trunk/SKDisplayPrefs.m =================================================================== --- trunk/SKDisplayPrefs.m 2022-07-21 09:37:03 UTC (rev 13044) +++ trunk/SKDisplayPrefs.m 2022-07-23 22:53:16 UTC (rev 13045) @@ -44,7 +44,7 @@ @implementation SKDisplayPrefs -@dynamic name, pdfViewSettings, backgroundColor, sepiaTone; +@dynamic name, pdfViewSettings, backgroundColor, sepiaTone, inverted; - (id)initForFullScreen:(BOOL)isFullScreen { self = [super init]; @@ -117,4 +117,12 @@ [[NSUserDefaults standardUserDefaults] setDouble:fmin(sepiaTone, 1.0) forKey:SKSepiaToneKey]; } +- (BOOL)isInverted { + return [[NSUserDefaults standardUserDefaults] boolForKey:SKInvertColorsInDarkModeKey]; +} + +- (void)setInverted:(BOOL)inverted { + [[NSUserDefaults standardUserDefaults] setBool:inverted forKey:SKInvertColorsInDarkModeKey]; +} + @end Modified: trunk/Skim.sdef =================================================================== --- trunk/Skim.sdef 2022-07-21 09:37:03 UTC (rev 13044) +++ trunk/Skim.sdef 2022-07-23 22:53:16 UTC (rev 13045) @@ -956,6 +956,10 @@ description="Intensity of a sepia tone effect applied to the PDF content. The same for normal and full screen mode."> <cocoa key="sepiaTone"/> </property> + <property name="inverted" type="boolean" code="InvC" + description="Invert colors in Dark Mode? The same for normal and full screen mode."> + <cocoa key="inverted"/> + </property> </class> <class name="outline" plural="outlines" code="Outl" 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