Revision: 15713
          http://sourceforge.net/p/skim-app/code/15713
Author:   hofman
Date:     2025-10-26 15:47:40 +0000 (Sun, 26 Oct 2025)
Log Message:
-----------
more sensible scroll amount for small height

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

Modified: trunk/SKBasePDFView.m
===================================================================
--- trunk/SKBasePDFView.m       2025-10-26 15:38:54 UTC (rev 15712)
+++ trunk/SKBasePDFView.m       2025-10-26 15:47:40 UTC (rev 15713)
@@ -412,7 +412,7 @@
     if (clipView && [clipView isFlipped] == NO && NSMinY([clipView bounds]) < 
NSMinY(bounds)) {
         CGFloat height = NSHeight(bounds) - [clipView contentInsets].top;
         CGFloat bottom = NSMinY([[scrollView documentView] frame]);
-        bounds.origin.y = fmax(bottom, NSMinY(bounds) - fmin(fmax(height - 
10.0, 10.0), height));
+        bounds.origin.y = fmax(bottom, NSMinY(bounds) - fmax(height - 10.0, 
0.5 * height));
         [clipView scrollToPoint:bounds.origin];
         [scrollView reflectScrolledClipView:clipView];
     } else if (page && [[self currentPage] pageIndex] > [page pageIndex]) {
@@ -444,7 +444,7 @@
     if (clipView && [clipView isFlipped] == NO && NSMinY([clipView bounds]) > 
NSMinY(bounds)) {
         CGFloat height = NSHeight(bounds) - [clipView contentInsets].top;
         CGFloat top = NSMaxY([[scrollView documentView] frame]);
-        bounds.origin.y = fmin(top - height, NSMinY(bounds) + fmin(fmax(height 
- 10.0, 10.0), height));
+        bounds.origin.y = fmin(top - height, NSMinY(bounds) + fmax(height - 
10.0, 0.5 * height));
         [clipView scrollToPoint:bounds.origin];
         [scrollView reflectScrolledClipView:clipView];
     } else if (page && [[self currentPage] pageIndex] < [page pageIndex]) {

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