Revision: 15488
          http://sourceforge.net/p/skim-app/code/15488
Author:   hofman
Date:     2025-06-18 09:30:10 +0000 (Wed, 18 Jun 2025)
Log Message:
-----------
combine conditions

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

Modified: trunk/SKHighlightingTableRowView.m
===================================================================
--- trunk/SKHighlightingTableRowView.m  2025-06-17 22:18:43 UTC (rev 15487)
+++ trunk/SKHighlightingTableRowView.m  2025-06-18 09:30:10 UTC (rev 15488)
@@ -136,23 +136,21 @@
 }
 
 - (void)drawBackgroundInRect:(NSRect)dirtyRect {
-    if (@available(macOS 11.0, *)) {} else {
-        if (supportsHighlights &&
+    if (@available(macOS 11.0, *)) {} else if (supportsHighlights &&
             [self isSelected] == NO && [self highlightLevel] > 0 && [self 
isEmphasized]) {
-            NSRect rect = [[self viewAtColumn:0] frame];
-            rgba color;
-            [[[NSColor selectedMenuItemColor] 
colorUsingColorSpace:[NSColorSpace sRGBColorSpace]] getRed:&color.r 
green:&color.g blue:&color.b alpha:NULL];
-            color.a = fmin(1.0, 0.1 * [self highlightLevel]);
-            CGColorSpaceRef colorSpace = 
CGColorSpaceCreateWithName(kCGColorSpaceSRGB);
-            CGFloat domain[] = {0.0, 1.0};
-            CGFloat range[] = {0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0};
-            CGFunctionCallbacks callbacks = {0, &evaluateHighlight, NULL};
-            CGFunctionRef function = CGFunctionCreate((void *)&color, 1, 
domain, 4, range, &callbacks);
-            CGShadingRef shading = CGShadingCreateAxial(colorSpace, 
CGPointMake(NSMinX(rect), 0.0), CGPointMake(NSMaxX(rect), 0.0), function, 
false, false);
-            CGColorSpaceRelease(colorSpace);
-            CGContextDrawShading([[NSGraphicsContext currentContext] 
CGContext], shading);
-            CGShadingRelease(shading);
-        }
+        NSRect rect = [[self viewAtColumn:0] frame];
+        rgba color;
+        [[[NSColor selectedMenuItemColor] colorUsingColorSpace:[NSColorSpace 
sRGBColorSpace]] getRed:&color.r green:&color.g blue:&color.b alpha:NULL];
+        color.a = fmin(1.0, 0.1 * [self highlightLevel]);
+        CGColorSpaceRef colorSpace = 
CGColorSpaceCreateWithName(kCGColorSpaceSRGB);
+        CGFloat domain[] = {0.0, 1.0};
+        CGFloat range[] = {0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0};
+        CGFunctionCallbacks callbacks = {0, &evaluateHighlight, NULL};
+        CGFunctionRef function = CGFunctionCreate((void *)&color, 1, domain, 
4, range, &callbacks);
+        CGShadingRef shading = CGShadingCreateAxial(colorSpace, 
CGPointMake(NSMinX(rect), 0.0), CGPointMake(NSMaxX(rect), 0.0), function, 
false, false);
+        CGColorSpaceRelease(colorSpace);
+        CGContextDrawShading([[NSGraphicsContext currentContext] CGContext], 
shading);
+        CGShadingRelease(shading);
     }
     
     [super drawBackgroundInRect:dirtyRect];

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

Reply via email to