Revision: 12882
http://sourceforge.net/p/skim-app/code/12882
Author: hofman
Date: 2022-05-04 16:36:02 +0000 (Wed, 04 May 2022)
Log Message:
-----------
take content inset of pdfview into account for fit to height.width and fit to
pdf actions
Modified Paths:
--------------
trunk/SKMainWindowController_Actions.m
Modified: trunk/SKMainWindowController_Actions.m
===================================================================
--- trunk/SKMainWindowController_Actions.m 2022-05-04 15:08:44 UTC (rev
12881)
+++ trunk/SKMainWindowController_Actions.m 2022-05-04 16:36:02 UTC (rev
12882)
@@ -504,6 +504,7 @@
width = NSHeight(pageRect);
height = NSWidth(pageRect);
}
+ frame.size.height -= [[pdfView scrollView] contentInsets].top;
if ((displayMode & kPDFDisplaySinglePageContinuous) == 0) {
// zoom to width
NSUInteger numCols = (displayMode == kPDFDisplayTwoUp && pageCount > 1
&& ([pdfView displaysAsBook] == NO || pageCount > 2)) ? 2 : 1;
@@ -931,6 +932,8 @@
PDFPage *page = [[self pdfView] currentPage];
NSRect pageRect = layoutBoundsForPage(page, pdfView);
+ oldSize.height -= [[[self pdfView] scrollView] contentInsets].top;
+
// Calculate the new size for the pdfView
size.width = NSWidth(documentRect);
if (autoScales)
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