Revision: 15958
http://sourceforge.net/p/skim-app/code/15958
Author: hofman
Date: 2026-01-04 22:42:22 +0000 (Sun, 04 Jan 2026)
Log Message:
-----------
get inset from clipView
Modified Paths:
--------------
trunk/SKBasePDFView.m
Modified: trunk/SKBasePDFView.m
===================================================================
--- trunk/SKBasePDFView.m 2026-01-04 22:28:04 UTC (rev 15957)
+++ trunk/SKBasePDFView.m 2026-01-04 22:42:22 UTC (rev 15958)
@@ -243,16 +243,15 @@
static void verticallyScrollToPage(PDFView *pdfView, PDFPage *page) {
NSScrollView *scrollView = [pdfView embeddedScrollView];
- CGFloat inset = [scrollView contentInsets].top;
NSRect pageRect = [pdfView convertRect:[page boundsForBox:[pdfView
displayBox]] fromPage:page];
CGFloat midY = NSMidY([pdfView bounds]);
- if (NSMinY(pageRect) <= midY - 0.5 * inset && NSMaxY(pageRect) >= midY)
+ if (NSMinY(pageRect) <= midY - 0.5 * [scrollView contentInsets].top &&
NSMaxY(pageRect) >= midY)
return;
NSClipView *clipView = [scrollView contentView];
NSRect bounds = [clipView bounds];
NSRect docRect = [[scrollView documentView] frame];
CGFloat margin = 0.0;
- inset = [pdfView convertSize:NSMakeSize(0.0, inset)
toView:clipView].height;
+ CGFloat inset = [clipView contentInsets].top;
if ([pdfView displaysPageBreaks])
margin = [pdfView convertSize:NSMakeSize(0.0, [pdfView
pageBreakMargins].top * [pdfView scaleFactor]) toView:clipView].height;
pageRect = [pdfView convertRect:pageRect toView: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