Revision: 14077
          http://sourceforge.net/p/skim-app/code/14077
Author:   hofman
Date:     2024-02-29 10:18:25 +0000 (Thu, 29 Feb 2024)
Log Message:
-----------
don't substract 10 from scroll amount for low height, which can happen with 
very high zoom

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

Modified: trunk/SKBasePDFView.m
===================================================================
--- trunk/SKBasePDFView.m       2024-02-28 23:37:15 UTC (rev 14076)
+++ trunk/SKBasePDFView.m       2024-02-29 10:18:25 UTC (rev 14077)
@@ -333,7 +333,7 @@
     // check whether our assumptions are still correct
     if (clipView && [clipView isFlipped] == NO && NSMinY([clipView bounds]) < 
NSMinY(bounds)) {
         CGFloat height = NSHeight(bounds) - [clipView contentInsets].top;
-        bounds.origin.y = fmax(bottom, NSMinY(bounds) - height + 10.0);
+        bounds.origin.y = fmax(bottom, NSMinY(bounds) - fmin(fmax(height - 
10.0, 10.0), height));
         [clipView scrollToPoint:bounds.origin];
         [scrollView reflectScrolledClipView:clipView];
     }
@@ -360,7 +360,7 @@
     // check whether our assumptions are still correct
     if (clipView && [clipView isFlipped] == NO && NSMinY([clipView bounds]) > 
NSMinY(bounds)) {
         CGFloat height = NSHeight(bounds) - [clipView contentInsets].top;
-        bounds.origin.y = fmin(top - height, NSMinY(bounds) + height - 10.0);
+        bounds.origin.y = fmin(top - height, NSMinY(bounds) + fmin(fmax(height 
- 10.0, 10.0), height));
         [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