Revision: 14121
http://sourceforge.net/p/skim-app/code/14121
Author: hofman
Date: 2024-03-20 18:13:02 +0000 (Wed, 20 Mar 2024)
Log Message:
-----------
Enable private setting to animate page navigation by swipe, this fixes swipe
navigation in single page mode
Modified Paths:
--------------
trunk/PDFView_SKExtensions.h
trunk/SKPDFView.m
Modified: trunk/PDFView_SKExtensions.h
===================================================================
--- trunk/PDFView_SKExtensions.h 2024-03-20 17:07:49 UTC (rev 14120)
+++ trunk/PDFView_SKExtensions.h 2024-03-20 18:13:02 UTC (rev 14121)
@@ -83,4 +83,6 @@
@interface PDFView (SKPrivateDeclarations)
- (NSInteger)currentHistoryIndex;
- (BOOL)writeSelectionToPasteboard:(NSPasteboard *)pboard types:(NSArray
*)types;
+- (BOOL)hasEnabledSwipeGestures;
+- (void)enableSwipeGestures:(BOOL)flag;
@end
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2024-03-20 17:07:49 UTC (rev 14120)
+++ trunk/SKPDFView.m 2024-03-20 18:13:02 UTC (rev 14121)
@@ -322,6 +322,11 @@
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 registerForDraggedTypes:@[NSPasteboardTypeColor,
SKPasteboardTypeLineStyle]];
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
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