Revision: 14626
          http://sourceforge.net/p/skim-app/code/14626
Author:   hofman
Date:     2024-11-02 15:31:41 +0000 (Sat, 02 Nov 2024)
Log Message:
-----------
invert condition so we can share default code path for old and new OS

Modified Paths:
--------------
    trunk/SkimNotes/SKNPDFAnnotationNote.m

Modified: trunk/SkimNotes/SKNPDFAnnotationNote.m
===================================================================
--- trunk/SkimNotes/SKNPDFAnnotationNote.m      2024-11-02 15:04:31 UTC (rev 
14625)
+++ trunk/SkimNotes/SKNPDFAnnotationNote.m      2024-11-02 15:31:41 UTC (rev 
14626)
@@ -248,10 +248,8 @@
         [NSGraphicsContext restoreGraphicsState];
         CGContextRestoreGState(context);
 #if !defined(MAC_OS_X_VERSION_10_15) || MAC_OS_X_VERSION_MIN_REQUIRED < 
MAC_OS_X_VERSION_10_15
-    } else if (floor(NSAppKitVersionNumber) < SKNAppKitVersionNumber10_12 || 
floor(NSAppKitVersionNumber) > SKNAppKitVersionNumber10_14 || [self 
hasAppearanceStream]) {
-        [super drawWithBox:box inContext:context];
-    } else {
-        // on 10.12 draws based on the type rather than the (super)class
+    } else if ([self hasAppearanceStream] == NO && 
floor(NSAppKitVersionNumber) <= SKNAppKitVersionNumber10_14 && 
floor(NSAppKitVersionNumber) >= SKNAppKitVersionNumber10_12) {
+        // on 10.12 through 10.14 draws based on the type rather than the 
/Subtype
         // as PDFKit does not know type Note we need to draw ourselves
         // type Text does just draws a dumb filled square anyway
         NSRect bounds = [self bounds];
@@ -266,12 +264,10 @@
             CGContextFillRect(context, NSRectToCGRect(bounds));
         }
         CGContextRestoreGState(context);
-    }
-#else
+#endif
     } else {
         [super drawWithBox:box inContext:context];
     }
-#endif
 }
 
 #if !defined(MAC_OS_X_VERSION_10_12) || MAC_OS_X_VERSION_MIN_REQUIRED < 
MAC_OS_X_VERSION_10_12

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