Revision: 15721
http://sourceforge.net/p/skim-app/code/15721
Author: hofman
Date: 2025-10-27 17:11:48 +0000 (Mon, 27 Oct 2025)
Log Message:
-----------
check both halfway points with and without taking into account content inset,
as Apple may change its logic
Modified Paths:
--------------
trunk/SKBasePDFView.m
Modified: trunk/SKBasePDFView.m
===================================================================
--- trunk/SKBasePDFView.m 2025-10-27 16:31:07 UTC (rev 15720)
+++ trunk/SKBasePDFView.m 2025-10-27 17:11:48 UTC (rev 15721)
@@ -246,8 +246,8 @@
NSScrollView *scrollView = [self scrollView];
CGFloat inset = [scrollView contentInsets].top;
NSRect pageRect = [self convertRect:[page boundsForBox:[self displayBox]]
fromPage:page];
- CGFloat midY = NSMidY([self bounds]) - 0.5 * inset;
- if (NSMinY(pageRect) <= midY && NSMaxY(pageRect) >= midY)
+ CGFloat midY = NSMidY([self bounds]);
+ if (NSMinY(pageRect) <= midY - 0.5 * inset && NSMaxY(pageRect) >= midY)
return;
NSClipView *clipView = [scrollView contentView];
NSRect bounds = [clipView bounds];
@@ -260,7 +260,7 @@
if ([clipView isFlipped])
bounds.origin.y = fmin(fmax(fmin(NSMinY(pageRect) - 0.5 *
(NSHeight(bounds) + inset), NSMinY(pageRect) - margin - inset), NSMinY(docRect)
- inset), NSMaxY(docRect) - NSHeight(bounds));
else
- bounds.origin.y = fmin(fmax(fmax(NSMaxY(pageRect) + margin -
NSHeight(bounds) + inset, NSMinY(pageRect) - 0.5 * (NSHeight(bounds) - inset)),
NSMinY(docRect)), NSMaxY(docRect) - NSHeight(bounds) + inset);
+ bounds.origin.y = fmin(fmax(fmax(NSMinY(pageRect) - 0.5 *
(NSHeight(bounds) - inset), NSMaxY(pageRect) + margin - NSHeight(bounds) +
inset), NSMinY(docRect)), NSMaxY(docRect) - NSHeight(bounds) + inset);
[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