Revision: 16012
          http://sourceforge.net/p/skim-app/code/16012
Author:   hofman
Date:     2026-01-13 16:54:08 +0000 (Tue, 13 Jan 2026)
Log Message:
-----------
constrain scroll point

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

Modified: trunk/PDFView_SKExtensions.m
===================================================================
--- trunk/PDFView_SKExtensions.m        2026-01-13 16:46:05 UTC (rev 16011)
+++ trunk/PDFView_SKExtensions.m        2026-01-13 16:54:08 UTC (rev 16012)
@@ -219,10 +219,12 @@
         if (@available(macOS 12.0, *)) {
             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] == NO)
-                dest.point.y -= NSHeight([clipView visibleRect]) - [clipView 
contentInsets].top;
-            [clipView scrollToPoint:dest.point];
+                bounds.origin.y -= NSHeight(bounds) - [clipView 
contentInsets].top;
+            bounds = [clipView constrainBoundsRect:bounds];
+            [clipView scrollToPoint:bounds.origin];
             [scrollView reflectScrolledClipView:clipView];
         }
     }

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