Revision: 12761
          http://sourceforge.net/p/skim-app/code/12761
Author:   hofman
Date:     2022-02-03 16:07:50 +0000 (Thu, 03 Feb 2022)
Log Message:
-----------
macOS 11+ already handles PDFView scroller appearance correctly

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

Modified: trunk/SKBasePDFView.m
===================================================================
--- trunk/SKBasePDFView.m       2022-02-03 16:03:20 UTC (rev 12760)
+++ trunk/SKBasePDFView.m       2022-02-03 16:07:50 UTC (rev 12761)
@@ -94,10 +94,13 @@
         SKSetHasLightAppearance([[self scrollView] contentView]);
         if ([[NSUserDefaults standardUserDefaults] 
boolForKey:SKInvertColorsInDarkModeKey])
             SKSetHasLightAppearance([self scrollView]);
-        [self handleScrollerStyleChangedNotification:nil];
         
-        [[NSNotificationCenter defaultCenter] addObserver:self 
selector:@selector(handleScrollerStyleChangedNotification:)
-                                                     
name:NSPreferredScrollerStyleDidChangeNotification object:nil];
+        if (!RUNNING_AFTER(10_15)) {
+            [self handleScrollerStyleChangedNotification:nil];
+            
+            [[NSNotificationCenter defaultCenter] addObserver:self 
selector:@selector(handleScrollerStyleChangedNotification:)
+                                                         
name:NSPreferredScrollerStyleDidChangeNotification object:nil];
+        }
     }
     
     [[self scrollView] setContentFilters:SKColorEffectFilters()];
@@ -152,7 +155,7 @@
     [[self scrollView] setContentFilters:SKColorEffectFilters()];
 }
 
-- (void)handleScrollerStyleChangedNotification:(NSNotification *)notification {
+- (void)handleScrollerStyleChangedNotification:(NSNotification *)notification 
{return;
     if ([NSScroller preferredScrollerStyle] == NSScrollerStyleLegacy) {
         SKSetHasDefaultAppearance([[self scrollView] verticalScroller]);
         SKSetHasDefaultAppearance([[self scrollView] horizontalScroller]);

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