Revision: 15960
http://sourceforge.net/p/skim-app/code/15960
Author: hofman
Date: 2026-01-05 15:34:35 +0000 (Mon, 05 Jan 2026)
Log Message:
-----------
inlcude page margin for horizontal scrolling explicitly
Modified Paths:
--------------
trunk/SKBasePDFView.m
Modified: trunk/SKBasePDFView.m
===================================================================
--- trunk/SKBasePDFView.m 2026-01-05 15:25:22 UTC (rev 15959)
+++ trunk/SKBasePDFView.m 2026-01-05 15:34:35 UTC (rev 15960)
@@ -235,8 +235,11 @@
NSRect docRect = [[scrollView documentView] frame];
if (NSWidth(docRect) <= NSWidth(bounds))
return;
- NSRect pageBounds = [pdfView convertRect:[pdfView convertRect:[pdfView
boundsIncludingMarginsForPage:page] fromPage:page] toView:clipView];
- bounds.origin.x = fmin(fmax(fmin(NSMidX(pageBounds) - 0.5 *
NSWidth(bounds), NSMinX(pageBounds)), NSMinX(docRect)), NSMaxX(docRect) -
NSWidth(bounds));
+ NSRect pageBounds = [pdfView convertRect:[pdfView convertRect:[page
boundsForBox:[pdfView displayBox]] fromPage:page] toView:clipView];
+ CGFloat margin = 0.0;
+ if ([pdfView displaysPageBreaks])
+ margin = [pdfView convertSize:NSMakeSize([pdfView
pageBreakMargins].left * [pdfView scaleFactor], 0.0) toView:clipView].width;
+ bounds.origin.x = fmin(fmax(fmin(NSMidX(pageBounds) - 0.5 *
NSWidth(bounds), NSMinX(pageBounds) - margin), NSMinX(docRect)),
NSMaxX(docRect) - NSWidth(bounds));
[pdfView goToPage:page];
[clipView scrollPoint:bounds.origin];
}
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