Revision: 15708
http://sourceforge.net/p/skim-app/code/15708
Author: hofman
Date: 2025-10-25 16:44:17 +0000 (Sat, 25 Oct 2025)
Log Message:
-----------
use fmin/fmax
Modified Paths:
--------------
trunk/SKBasePDFView.m
Modified: trunk/SKBasePDFView.m
===================================================================
--- trunk/SKBasePDFView.m 2025-10-25 09:18:22 UTC (rev 15707)
+++ trunk/SKBasePDFView.m 2025-10-25 16:44:17 UTC (rev 15708)
@@ -413,7 +413,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) - (height < 10.0 ?
height : height < 20.0 ? 10.0 : 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];
} else if (page && [[self currentPage] pageIndex] > [page pageIndex]) {
@@ -445,7 +445,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) + (height < 10.0 ?
height : height < 20.0 ? 10.0 : 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];
} 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