Revision: 14365
          http://sourceforge.net/p/skim-app/code/14365
Author:   hofman
Date:     2024-07-05 16:26:35 +0000 (Fri, 05 Jul 2024)
Log Message:
-----------
mix transparent background color with white, as that is what PDFView does

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

Modified: trunk/SKLoupeController.m
===================================================================
--- trunk/SKLoupeController.m   2024-07-04 14:46:04 UTC (rev 14364)
+++ trunk/SKLoupeController.m   2024-07-05 16:26:35 UTC (rev 14365)
@@ -128,7 +128,7 @@
             __block CGColorRef cgColor = NULL;
             SKRunWithAppearance([pdfView scrollView], ^{
                 if ([bgColor alphaComponent] < 1.0)
-                    cgColor = [[[NSColor blackColor] 
blendedColorWithFraction:[bgColor alphaComponent] ofColor:[bgColor 
colorWithAlphaComponent:1.0]] CGColor];
+                    cgColor = [[[NSColor whiteColor] 
blendedColorWithFraction:[bgColor alphaComponent] ofColor:[bgColor 
colorWithAlphaComponent:1.0]] CGColor];
                 if (cgColor == NULL)
                     cgColor = [bgColor CGColor] ?: 
CGColorGetConstantColor(kCGColorBlack);
             });
@@ -155,7 +155,7 @@
     } else {
         NSColor *bgColor = [pdfView backgroundColor];
         if ([bgColor alphaComponent] < 1.0)
-            bgColor = [[NSColor blackColor] blendedColorWithFraction:[bgColor 
alphaComponent] ofColor:[bgColor colorWithAlphaComponent:1.0]] ?: bgColor;
+            bgColor = [[NSColor whiteColor] blendedColorWithFraction:[bgColor 
alphaComponent] ofColor:[bgColor colorWithAlphaComponent:1.0]] ?: bgColor;
         [layer setBackgroundColor:[bgColor CGColor]];
     }
 }

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