Revision: 15912
http://sourceforge.net/p/skim-app/code/15912
Author: hofman
Date: 2025-12-23 15:11:34 +0000 (Tue, 23 Dec 2025)
Log Message:
-----------
rename method
Modified Paths:
--------------
trunk/PDFDestination_SKExtensions.m
trunk/PDFView_SKExtensions.h
trunk/PDFView_SKExtensions.m
trunk/SKBasePDFView.m
trunk/SKMainWindowController_Actions.m
trunk/SKPDFView.m
Modified: trunk/PDFDestination_SKExtensions.m
===================================================================
--- trunk/PDFDestination_SKExtensions.m 2025-12-23 15:06:01 UTC (rev 15911)
+++ trunk/PDFDestination_SKExtensions.m 2025-12-23 15:11:34 UTC (rev 15912)
@@ -62,7 +62,7 @@
override = NO;
break;
case 1: // Fit
- bounds = pdfView ? [pdfView layoutBoundsForPage:page] : [page
boundsForBox:kPDFDisplayBoxCropBox];
+ bounds = pdfView ? [pdfView
boundsIncludingMarginsForPage:page] : [page boundsForBox:kPDFDisplayBoxCropBox];
if (pdfView && NSIsEmptyRect(bounds) == NO) {
zoomX = size.width / NSWidth(bounds);
zoomY = size.height / NSHeight(bounds);
@@ -69,7 +69,7 @@
}
break;
case 2: // FitH
- bounds = pdfView ? [pdfView layoutBoundsForPage:page] : [page
boundsForBox:kPDFDisplayBoxCropBox];
+ bounds = pdfView ? [pdfView
boundsIncludingMarginsForPage:page] : [page boundsForBox:kPDFDisplayBoxCropBox];
@try { point.y = [[self valueForKeyPath:@"_private.top"]
doubleValue]; }
@catch (id e) { override = NO; }
if (override && pdfView && NSIsEmptyRect(bounds) == NO)
@@ -81,7 +81,7 @@
}
break;
case 3: // FitV
- bounds = pdfView ? [pdfView layoutBoundsForPage:page] : [page
boundsForBox:kPDFDisplayBoxCropBox];
+ bounds = pdfView ? [pdfView
boundsIncludingMarginsForPage:page] : [page boundsForBox:kPDFDisplayBoxCropBox];
@try { point.x = [[self valueForKeyPath:@"_private.left"]
doubleValue]; }
@catch (id e) { override = NO; }
if (override && pdfView && NSIsEmptyRect(bounds) == NO)
Modified: trunk/PDFView_SKExtensions.h
===================================================================
--- trunk/PDFView_SKExtensions.h 2025-12-23 15:06:01 UTC (rev 15911)
+++ trunk/PDFView_SKExtensions.h 2025-12-23 15:11:34 UTC (rev 15912)
@@ -72,7 +72,7 @@
- (void)goAndScrollToPage:(PDFPage *)page;
-- (NSRect)layoutBoundsForPage:(PDFPage *)page;
+- (NSRect)boundsIncludingMarginsForPage:(PDFPage *)page;
@property (class, nonatomic, readonly) NSColor *defaultBackgroundColor;
@property (class, nonatomic, readonly) NSColor
*defaultFullScreenBackgroundColor;
Modified: trunk/PDFView_SKExtensions.m
===================================================================
--- trunk/PDFView_SKExtensions.m 2025-12-23 15:06:01 UTC (rev 15911)
+++ trunk/PDFView_SKExtensions.m 2025-12-23 15:11:34 UTC (rev 15912)
@@ -275,7 +275,7 @@
return rect;
}
-- (NSRect)layoutBoundsForPage:(PDFPage *)page {
+- (NSRect)boundsIncludingMarginsForPage:(PDFPage *)page {
NSRect pageRect = [page boundsForBox:[self displayBox]];
if ([self displaysPageBreaks]) {
NSEdgeInsets margins = [self pageBreakMargins];
Modified: trunk/SKBasePDFView.m
===================================================================
--- trunk/SKBasePDFView.m 2025-12-23 15:06:01 UTC (rev 15911)
+++ trunk/SKBasePDFView.m 2025-12-23 15:11:34 UTC (rev 15912)
@@ -235,7 +235,7 @@
NSRect docRect = [[scrollView documentView] frame];
if (NSWidth(docRect) <= NSWidth(bounds))
return;
- NSRect pageBounds = [pdfView convertRect:[pdfView convertRect:[pdfView
layoutBoundsForPage:page] fromPage:page] toView:clipView];
+ 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));
[pdfView goToPage:page];
[clipView scrollToPoint:bounds.origin];
Modified: trunk/SKMainWindowController_Actions.m
===================================================================
--- trunk/SKMainWindowController_Actions.m 2025-12-23 15:06:01 UTC (rev
15911)
+++ trunk/SKMainWindowController_Actions.m 2025-12-23 15:11:34 UTC (rev
15912)
@@ -460,7 +460,7 @@
PDFDisplayMode displayMode = [pdfView extendedDisplayMode];
NSRect frame = [pdfView frame];
PDFPage *page = [pdfView currentPage];
- NSRect pageRect = [pdfView layoutBoundsForPage:page];
+ NSRect pageRect = [pdfView boundsIncludingMarginsForPage:page];
CGFloat width, height;
CGFloat scrollerWidth = 0.0;
CGFloat scaleFactor;
@@ -901,7 +901,7 @@
NSSize size, oldSize = [[self pdfView] frame].size;
NSRect documentRect = [[[self pdfView] documentView] convertRect:[[[self
pdfView] documentView] bounds] toView:nil];
PDFPage *page = [[self pdfView] currentPage];
- NSRect pageRect = [pdfView layoutBoundsForPage:page];
+ NSRect pageRect = [pdfView boundsIncludingMarginsForPage:page];
oldSize.height -= [[[self pdfView] scrollView] contentInsets].top;
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2025-12-23 15:06:01 UTC (rev 15911)
+++ trunk/SKPDFView.m 2025-12-23 15:11:34 UTC (rev 15912)
@@ -1588,7 +1588,7 @@
NSRect bounds = [clipView bounds];
CGFloat inset = [clipView contentInsets].top;
NSRect docRect = [[scrollView documentView] frame];
- NSRect pageRect = [self convertRect:[self convertRect:[self
layoutBoundsForPage:rewindPage] fromPage:rewindPage] toView:clipView];
+ NSRect pageRect = [self convertRect:[self convertRect:[self
boundsIncludingMarginsForPage:rewindPage] fromPage:rewindPage] toView:clipView];
if ((mode & (kPDFDisplayHorizontalContinuous | kPDFDisplayTwoUp)) &&
NSWidth(docRect) > NSWidth(bounds)) {
bounds.origin.x = fmin(fmax(fmin(NSMidX(pageRect) - 0.5 *
NSWidth(bounds), NSMinX(pageRect)), NSMinX(docRect)), NSMaxX(docRect) -
NSWidth(bounds));
}
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