Revision: 16011
http://sourceforge.net/p/skim-app/code/16011
Author: hofman
Date: 2026-01-13 16:46:05 +0000 (Tue, 13 Jan 2026)
Log Message:
-----------
constrain scroll point
Modified Paths:
--------------
trunk/SKBasePDFView.m
Modified: trunk/SKBasePDFView.m
===================================================================
--- trunk/SKBasePDFView.m 2026-01-13 16:09:05 UTC (rev 16010)
+++ trunk/SKBasePDFView.m 2026-01-13 16:46:05 UTC (rev 16011)
@@ -387,12 +387,14 @@
if (NSEqualPoints(dest.point, SKUnspecifiedPoint) == NO) {
NSScrollView *scrollView = [self embeddedScrollView];
NSClipView *clipView = [scrollView contentView];
- dest.point = [self convertPoint:[self convertPoint:dest.point
fromPage:page] toView:clipView];
+ NSRect bounds = [clipView bounds];
+ bounds.origin = [self convertPoint:[self convertPoint:dest.point
fromPage:page] toView:clipView];
if ([clipView isFlipped])
- dest.point.y -= [clipView contentInsets].top;
+ bounds.origin.y -= [clipView contentInsets].top;
else
- dest.point.y -= NSHeight([clipView bounds]) - [clipView
contentInsets].top;
- [clipView scrollToPoint:dest.point];
+ bounds.origin.y -= NSHeight([clipView bounds]) - [clipView
contentInsets].top;
+ bounds = [clipView constrainBoundsRect:bounds];
+ [clipView scrollToPoint:bounds.origin];
[scrollView reflectScrolledClipView:clipView];
} else if ([self displayDirection] == kPDFDisplayDirectionVertical &&
([self displayMode] & kPDFDisplaySinglePageContinuous)) {
[self scrollToPage:page mode:kPDFDisplaySinglePageContinuous];
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