Revision: 16409
          http://sourceforge.net/p/skim-app/code/16409
Author:   hofman
Date:     2026-09-01 16:47:52 +0000 (Tue, 01 Sep 2026)
Log Message:
-----------
cache factor rather than background white

Modified Paths:
--------------
    trunk/NSGraphics_SKExtensions.m

Modified: trunk/NSGraphics_SKExtensions.m
===================================================================
--- trunk/NSGraphics_SKExtensions.m     2026-09-01 16:43:55 UTC (rev 16408)
+++ trunk/NSGraphics_SKExtensions.m     2026-09-01 16:47:52 UTC (rev 16409)
@@ -191,12 +191,12 @@
 static inline CGFloat sRGBFromGamma16(CGFloat c) { return c <= 0.0031308 ? 
12.92 * pow(c, 1.6) : 1.055 * pow(c, 2.0/3.0) - 0.055; }
 
 static CGFloat invertedColorsFilterFactor() {
-    static CGFloat backgroundWhite = -1.0;
-    if (backgroundWhite < 0.0) {
+    static CGFloat customFactor = -1.0;
+    if (customFactor < 0.0) {
         NSNumber *bgw = [[NSUserDefaults standardUserDefaults] 
objectForKey:SKInvertedColorsBackgroundWhiteKey];
-        backgroundWhite = bgw ? sRGBToGamma16(fmax(0.0, fmin(1.0, [bgw  
doubleValue]))) : 2.0;
+        customFactor = bgw ? 2.0 - sRGBToGamma16(fmax(0.0, fmin(1.0, [bgw  
doubleValue]))) : 0.0;
     }
-    return 2.0 - backgroundWhite ?: [[NSWorkspace sharedWorkspace] 
accessibilityDisplayShouldIncreaseContrast] ? 1.9338 : 1.8972;
+    return customFactor ?: [[NSWorkspace sharedWorkspace] 
accessibilityDisplayShouldIncreaseContrast] ? 1.9338 : 1.8972;
 }
 
 NSArray *SKColorEffectFilters(void) {

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to