Revision: 16104
          http://sourceforge.net/p/skim-app/code/16104
Author:   hofman
Date:     2026-03-25 16:57:36 +0000 (Wed, 25 Mar 2026)
Log Message:
-----------
avoid using DestinationAtop as that has drawing artifects

Modified Paths:
--------------
    trunk/NSImage_SKExtensions.m
    trunk/SKBookmark.m
    trunk/SKDownload.m

Modified: trunk/NSImage_SKExtensions.m
===================================================================
--- trunk/NSImage_SKExtensions.m        2026-03-25 15:49:09 UTC (rev 16103)
+++ trunk/NSImage_SKExtensions.m        2026-03-25 16:57:36 UTC (rev 16104)
@@ -940,9 +940,10 @@
         if (img) {
             [img drawInRect:NSMakeRect(4.0, 4.0, 18.0, 12.0) 
fromRect:NSZeroRect operation:NSCompositingOperationSourceOver fraction:1.0];
         } else {
+            [[NSImage imageNamed:NSImageNameFontPanel] 
drawInRect:NSMakeRect(4.0, 1.0, 19.0, 19.0) fromRect:NSZeroRect 
operation:NSCompositingOperationSourceOver fraction:1.0];
+            [[NSGraphicsContext currentContext] 
setCompositingOperation:NSCompositingOperationSourceIn];
             [[NSColor blackColor] setFill];
             [NSBezierPath fillRect:NSMakeRect(4.0, 1.0, 19.0, 19.0)];
-            [[NSImage imageNamed:NSImageNameFontPanel] 
drawInRect:NSMakeRect(4.0, 1.0, 19.0, 19.0) fromRect:NSZeroRect 
operation:NSCompositingOperationDestinationAtop fraction:1.0];
         }
     );
     
@@ -1382,8 +1383,10 @@
     MAKE_IMAGE(SKImageNameDisplayPreferences, NO, 32.0, 32.0,
         NSImage *fontImage = [NSImage imageNamed:NSImageNameFontPanel];
         NSImage *colorImage = [NSImage imageNamed:NSImageNameColorPanel];
-        NSRectFill(NSMakeRect(0.0, 0.0, 21.0, 29.0));
-        [fontImage drawInRect:NSMakeRect(-4.0, 0.0, 29.0, 29.0) 
fromRect:NSZeroRect operation:NSCompositingOperationDestinationAtop 
fraction:1.0];
+        [fontImage drawInRect:NSMakeRect(-4.0, 0.0, 29.0, 29.0) 
fromRect:NSZeroRect operation:NSCompositingOperationSourceOver fraction:1.0];
+        [[NSGraphicsContext currentContext] 
setCompositingOperation:NSCompositingOperationSourceIn];
+        [[NSColor blackColor] setFill];
+        [NSBezierPath fillRect:NSMakeRect(0.0, 0.0, 21.0, 29.0)];
         [colorImage drawInRect:NSMakeRect(0.0, 0.0, 32.0, 32.0) 
fromRect:NSZeroRect operation:NSCompositingOperationDestinationOver 
fraction:1.0];
     );
     
@@ -1401,9 +1404,10 @@
     MAKE_IMAGE(SKImageNameSyncPreferences, NO, 32.0, 32.0,
         NSImage *refreshImage = [NSImage 
imageNamed:NSImageNameRefreshTemplate];
         NSImage *genericDocImage = [[NSWorkspace sharedWorkspace] 
iconForFileType:NSFileTypeForHFSTypeCode(kGenericDocumentIcon)];
-        [[NSColor colorWithSRGBRed:0.3 green:0.45 blue:0.65 alpha:1.0] set];
-        NSRectFill(NSMakeRect(11.0, 10.0, 10.0, 12.0));
-        [refreshImage drawInRect:NSMakeRect(11.0, 10.0, 10.0, 12.0) 
fromRect:NSZeroRect operation:NSCompositingOperationDestinationAtop 
fraction:1.0];
+        [refreshImage drawInRect:NSMakeRect(11.0, 10.0, 10.0, 12.0) 
fromRect:NSZeroRect operation:NSCompositingOperationSourceOver fraction:1.0];
+        [[NSGraphicsContext currentContext] 
setCompositingOperation:NSCompositingOperationSourceIn];
+        [[NSColor colorWithSRGBRed:0.3 green:0.45 blue:0.65 alpha:1.0] 
setFill];
+        [NSBezierPath fillRect:NSMakeRect(11.0, 10.0, 10.0, 12.0)];
         [genericDocImage drawInRect:NSMakeRect(0.0, 0.0, 32.0, 32.0) 
fromRect:NSZeroRect operation:NSCompositingOperationDestinationOver 
fraction:1.0];
     );
 }

Modified: trunk/SKBookmark.m
===================================================================
--- trunk/SKBookmark.m  2026-03-25 15:49:09 UTC (rev 16103)
+++ trunk/SKBookmark.m  2026-03-25 16:57:36 UTC (rev 16104)
@@ -404,9 +404,10 @@
             icon = [self iconForFileType:type hasSetup:NO];
             NSImage *badge = [NSImage 
imageNamed:NSImageNameSmartBadgeTemplate];
             icon = [NSImage imageWithSize:NSMakeSize(16.0, 16.0) flipped:NO 
drawingHandler:^(NSRect rect) {
+                [badge drawInRect:NSMakeRect(8.0, 0.0, 8.0, 8.0) 
fromRect:NSZeroRect operation:NSCompositingOperationSourceOver fraction:1.0];
+                [[NSGraphicsContext currentContext] 
setCompositingOperation:NSCompositingOperationSourceIn];
                 [[NSColor darkGrayColor] setFill];
                 [NSBezierPath fillRect:NSMakeRect(8.0, 0.0, 8.0, 8.0)];
-                [badge drawInRect:NSMakeRect(8.0, 0.0, 8.0, 8.0) 
fromRect:NSZeroRect operation:NSCompositingOperationDestinationAtop 
fraction:1.0];
                 [icon drawInRect:rect fromRect:NSZeroRect 
operation:NSCompositingOperationDestinationOver fraction:1.0];
                 return YES;
             }];

Modified: trunk/SKDownload.m
===================================================================
--- trunk/SKDownload.m  2026-03-25 15:49:09 UTC (rev 16103)
+++ trunk/SKDownload.m  2026-03-25 16:57:36 UTC (rev 16104)
@@ -95,7 +95,7 @@
     static NSImage *cancelImage = nil;
     if (cancelImage == nil) {
         cancelImage = [NSImage imageWithSize:NSMakeSize(16.0, 16.0) flipped:NO 
drawingHandler:^(NSRect rect){
-            [[NSImage imageNamed:NSImageNameStopProgressFreestandingTemplate] 
drawInRect:NSInsetRect(rect, 1.0, 1.0) fromRect:NSZeroRect 
operation:NSCompositingOperationDestinationAtop fraction:1.0];
+            [[NSImage imageNamed:NSImageNameStopProgressFreestandingTemplate] 
drawInRect:NSInsetRect(rect, 1.0, 1.0) fromRect:NSZeroRect 
operation:NSCompositingOperationSourceOver fraction:1.0];
             return YES;
         }];
         [cancelImage setTemplate:YES];
@@ -108,7 +108,7 @@
     static NSImage *resumeImage = nil;
     if (resumeImage == nil) {
         resumeImage = [NSImage imageWithSize:NSMakeSize(16.0, 16.0) flipped:NO 
drawingHandler:^(NSRect rect){
-            [[NSImage imageNamed:NSImageNameRefreshFreestandingTemplate] 
drawInRect:NSInsetRect(rect, 1.0, 1.0) fromRect:NSZeroRect 
operation:NSCompositingOperationDestinationAtop fraction:1.0];
+            [[NSImage imageNamed:NSImageNameRefreshFreestandingTemplate] 
drawInRect:NSInsetRect(rect, 1.0, 1.0) fromRect:NSZeroRect 
operation:NSCompositingOperationSourceOver fraction:1.0];
             return YES;
         }];
         [resumeImage setTemplate:YES];

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