Revision: 12296
          http://sourceforge.net/p/skim-app/code/12296
Author:   hofman
Date:     2021-04-14 09:10:27 +0000 (Wed, 14 Apr 2021)
Log Message:
-----------
Only draw mask when there is something to draw

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

Modified: trunk/SKHighlightingTableRowView.m
===================================================================
--- trunk/SKHighlightingTableRowView.m  2021-04-14 09:08:26 UTC (rev 12295)
+++ trunk/SKHighlightingTableRowView.m  2021-04-14 09:10:27 UTC (rev 12296)
@@ -73,10 +73,12 @@
     if (NSIsEmptyRect(rect) == NO) {
         NSRect rect = [self bounds];
         NSImage *mask = [[NSImage alloc] initWithSize:rect.size];
-        [mask lockFocus];
-        [[NSColor colorWithGenericGamma22White:0.0 alpha:0.05 * 
highlightLevel] setFill];
-        [[NSBezierPath bezierPathWithRoundedRect:NSInsetRect(rect, 10.0, 0.0) 
xRadius:5.0 yRadius:5.0] fill];
-        [mask unlockFocus];
+        if (NSWidth(rect) > 20.0) {
+            [mask lockFocus];
+            [[NSColor colorWithGenericGamma22White:0.0 alpha:0.05 * 
highlightLevel] setFill];
+            [[NSBezierPath bezierPathWithRoundedRect:NSInsetRect(rect, 10.0, 
0.0) xRadius:5.0 yRadius:5.0] fill];
+            [mask unlockFocus];
+        }
         [highlightView setMaskImage:mask];
         [mask release];
     }

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