Revision: 15997
http://sourceforge.net/p/skim-app/code/15997
Author: hofman
Date: 2026-01-11 15:54:40 +0000 (Sun, 11 Jan 2026)
Log Message:
-----------
scale in clipView is the same as in page space, so trust we don't need to
convert pageBreakMargins
Modified Paths:
--------------
trunk/SKBasePDFView.m
trunk/SKPDFView.m
Modified: trunk/SKBasePDFView.m
===================================================================
--- trunk/SKBasePDFView.m 2026-01-11 15:46:28 UTC (rev 15996)
+++ trunk/SKBasePDFView.m 2026-01-11 15:54:40 UTC (rev 15997)
@@ -245,7 +245,7 @@
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;
+ margin = [pdfView pageBreakMargins].left;
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];
@@ -264,7 +264,7 @@
CGFloat inset = [clipView contentInsets].top;
CGFloat scrollerWidth = 0.0;
if ([pdfView displaysPageBreaks])
- margin = [pdfView convertSize:NSMakeSize(0.0, [pdfView
pageBreakMargins].top * [pdfView scaleFactor]) toView:clipView].height;
+ margin = [pdfView pageBreakMargins].top;
if ([scrollView hasHorizontalScroller])
scrollerWidth = [pdfView convertSize:NSMakeSize(0.0, [NSScroller
effectiveScrollerWidth]) toView:clipView].height;
pageRect = [pdfView convertRect:pageRect toView:clipView];
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2026-01-11 15:46:28 UTC (rev 15996)
+++ trunk/SKPDFView.m 2026-01-11 15:54:40 UTC (rev 15997)
@@ -1516,12 +1516,12 @@
NSRect pageRect = [self convertRect:[self convertRect:[rewindPage
boundsForBox:[self displayBox]] fromPage:rewindPage] toView:clipView];
if ((mode & (kPDFDisplayHorizontalContinuous | kPDFDisplayTwoUp)) &&
NSWidth(docRect) > NSWidth(bounds)) {
if ([self displaysPageBreaks])
- margin = [self convertSize:NSMakeSize([self
pageBreakMargins].left * [self scaleFactor], 0.0) toView:clipView].width;
+ margin = [self pageBreakMargins].left;
bounds.origin.x = fmin(fmax(fmin(NSMidX(pageRect) - 0.5 *
NSWidth(bounds), NSMinX(pageRect) - margin), NSMinX(docRect)), NSMaxX(docRect)
- NSWidth(bounds));
}
if ((mode & kPDFDisplaySinglePageContinuous) && NSHeight(docRect) >
NSHeight(bounds) - inset) {
if ([self displaysPageBreaks])
- margin = [self convertSize:NSMakeSize(0.0, [self
pageBreakMargins].top * [self scaleFactor]) toView:clipView].height;
+ margin = [self pageBreakMargins].top;
if ([clipView isFlipped])
bounds.origin.y = fmin(fmax(fmin(NSMidY(pageRect) - 0.5 *
(NSHeight(bounds) + inset), NSMinY(pageRect) - margin - inset), NSMinY(docRect)
- inset), NSMaxY(docRect) - NSHeight(bounds));
else
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