Revision: 14132
http://sourceforge.net/p/skim-app/code/14132
Author: hofman
Date: 2024-03-24 00:05:21 +0000 (Sun, 24 Mar 2024)
Log Message:
-----------
Add scroller width to snapshot window size when using legacy scrollers
Modified Paths:
--------------
trunk/SKSnapshotWindowController.m
Modified: trunk/SKSnapshotWindowController.m
===================================================================
--- trunk/SKSnapshotWindowController.m 2024-03-23 23:55:59 UTC (rev 14131)
+++ trunk/SKSnapshotWindowController.m 2024-03-24 00:05:21 UTC (rev 14132)
@@ -63,6 +63,7 @@
#import "SKApplication.h"
#import "PDFDocument_SKExtensions.h"
#import "NSString_SKExtensions.h"
+#import "NSScroller_SKExtensions.h"
#define SMALL_DELAY 0.1
#define RESIZE_TIME_FACTOR 1.0
@@ -283,6 +284,11 @@
PDFPage *page = [pdfDocument pageAtIndex:pageNum];
NSRect frame = [pdfView convertRect:rect fromPage:page];
+ CGFloat scrollerWidth = [NSScroller effectiveScrollerWidth];
+ if (scrollerWidth > 0.0) {
+ frame.size.width += scrollerWidth;
+ frame.size.height += scrollerWidth;
+ }
frame = [pdfView convertRect:frame toView:nil];
frame = [NSWindow frameRectForContentRect:frame styleMask:[window
styleMask] & ~NSWindowStyleMaskFullSizeContentView];
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