Revision: 16496
          http://sourceforge.net/p/skim-app/code/16496
Author:   hofman
Date:     2026-09-17 21:17:07 +0000 (Thu, 17 Sep 2026)
Log Message:
-----------
disable swipe gestures when using (color invert) filters, as the filters aren't 
applied to the animation

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

Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m   2026-09-17 16:59:52 UTC (rev 16495)
+++ trunk/SKPDFView.m   2026-09-17 21:17:07 UTC (rev 16496)
@@ -215,6 +215,8 @@
 
 - (void)setNeedsDisplay:(BOOL)needsDisplay forReadingBarBounds:(NSRect)rect 
onPage:(PDFPage *)page notify:(BOOL)notify;
 
+- (void)updateSwipeGestures;
+
 - (void)doMoveCurrentAnnotationForKey:(unichar)eventChar 
byAmount:(CGFloat)delta;
 - (void)doResizeCurrentAnnotationForKey:(unichar)eventChar 
byAmount:(CGFloat)delta;
 - (void)doAutoSizeActiveNoteIgnoringWidth:(BOOL)ignoreWidth;
@@ -313,10 +315,7 @@
     if (options)
         [self addTrackingArea:[[NSTrackingArea alloc] initWithRect:NSZeroRect 
options:options | NSTrackingActiveInKeyWindow | NSTrackingInVisibleRect 
owner:self userInfo:nil]];
     
-    // without this private option,
-    // page navigation by swiping in single page mode is broken
-    if ([self respondsToSelector:@selector(enableSwipeGestures:)])
-        [self enableSwipeGestures:YES];
+    [self updateSwipeGestures];
     
     [self registerForDraggedTypes:@[NSPasteboardTypeColor, 
SKPasteboardTypeLineStyle, NSPasteboardTypeFileURL]];
     
@@ -3253,15 +3252,25 @@
 
 #pragma mark Dark mode
 
+- (void)updateSwipeGestures {
+    // without this private option,
+    // page navigation by swiping in single page mode is broken
+    // however the filters are not applied to the animation
+    if ([self respondsToSelector:@selector(enableSwipeGestures:)])
+        [self enableSwipeGestures:[[[self embeddedScrollView] contentFilters] 
count] == 0];
+}
+
 - (void)viewDidChangeEffectiveAppearance {
     if (@available(macOS 10.14, *))
         [super viewDidChangeEffectiveAppearance];
     [loupeController updateColorFilters];
+    [self updateSwipeGestures];
 }
 
 - (void)colorFiltersDidChange {
     [super colorFiltersDidChange];
     [loupeController updateColorFilters];
+    [self updateSwipeGestures];
 }
 
 #pragma mark Menu validation

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