Revision: 14080
http://sourceforge.net/p/skim-app/code/14080
Author: hofman
Date: 2024-03-01 00:13:22 +0000 (Fri, 01 Mar 2024)
Log Message:
-----------
correct page scroll amount for small height
Modified Paths:
--------------
trunk/SKBasePDFView.m
Modified: trunk/SKBasePDFView.m
===================================================================
--- trunk/SKBasePDFView.m 2024-02-29 15:51:32 UTC (rev 14079)
+++ trunk/SKBasePDFView.m 2024-03-01 00:13:22 UTC (rev 14080)
@@ -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) - fmin(fmax(height -
10.0, 10.0), height));
+ bounds.origin.y = fmax(bottom, NSMinY(bounds) - (height < 10.0 ?
height : height < 20.0 ? 10.0 : height - 10.0));
[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) + fmin(fmax(height
- 10.0, 10.0), height));
+ bounds.origin.y = fmin(top - height, NSMinY(bounds) + (height < 10.0 ?
height : height < 20.0 ? 10.0 : height - 10.0));
[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