Revision: 16652
http://sourceforge.net/p/skim-app/code/16652
Author: hofman
Date: 2026-10-12 15:06:18 +0000 (Mon, 12 Oct 2026)
Log Message:
-----------
get full origin after possibly scrolling
Modified Paths:
--------------
trunk/SKBasePDFView.m
Modified: trunk/SKBasePDFView.m
===================================================================
--- trunk/SKBasePDFView.m 2026-10-12 14:43:11 UTC (rev 16651)
+++ trunk/SKBasePDFView.m 2026-10-12 15:06:18 UTC (rev 16652)
@@ -510,7 +510,8 @@
}
}
- CGFloat scroll = NSMinY([clipView bounds]) - NSMinY(bounds);
+ NSPoint origin = [clipView bounds].origin;
+ CGFloat scroll = origin.y - NSMinY(bounds);
CGFloat offset = NSHeight(bounds) - [clipView contentInsets].top;
if (offset <= 2.0)
return;
@@ -522,7 +523,7 @@
bounds.origin.y += scroll < 0.0 ? -offset : offset;
[clipView scrollToPoint:bounds.origin];
[scrollView reflectScrolledClipView:clipView];
- } else if (canNavigate && fabs(scroll) <= 0.0 && NSEqualPoints([clipView
bounds].origin, bounds.origin)) {
+ } else if (canNavigate && NSEqualPoints(origin, bounds.origin)) {
// Apple does not navigate in horizontal mode or in non-scrolling mode
on macOS 27
if (keyDirection == 1)
[self goToNextPage:nil];
@@ -561,7 +562,8 @@
}
}
- CGFloat scroll = NSMinY([clipView bounds]) - NSMinY(bounds);
+ NSPoint origin = [clipView bounds].origin;
+ CGFloat scroll = origin.y - NSMinY(bounds);
CGFloat offset = NSHeight(bounds) - [clipView contentInsets].top;
if (offset <= 2.0)
return;
@@ -573,7 +575,7 @@
bounds.origin.y += scroll > 0.0 ? offset : -offset;
[clipView scrollToPoint:bounds.origin];
[scrollView reflectScrolledClipView:clipView];
- } else if (canNavigate && fabs(scroll) <= 0.0 && NSEqualPoints([clipView
bounds].origin, bounds.origin)) {
+ } else if (canNavigate && NSEqualPoints(origin, bounds.origin)) {
// Apple does not navigate in horizontal mode or in non-scrolling mode
on macOS 27
if (keyDirection == -1)
[self goToPreviousPage:nil];
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