Revision: 15883
http://sourceforge.net/p/skim-app/code/15883
Author: hofman
Date: 2025-12-17 16:56:31 +0000 (Wed, 17 Dec 2025)
Log Message:
-----------
rename method just to be sure
Modified Paths:
--------------
trunk/PDFDestination_SKExtensions.m
trunk/PDFView_SKExtensions.h
trunk/PDFView_SKExtensions.m
trunk/SKLoupeController.m
trunk/SKPDFView.m
trunk/SKSnapshotConfiguration.m
trunk/SKSnapshotPDFView.m
trunk/SKSnapshotWindowController.m
Modified: trunk/PDFDestination_SKExtensions.m
===================================================================
--- trunk/PDFDestination_SKExtensions.m 2025-12-17 15:55:37 UTC (rev 15882)
+++ trunk/PDFDestination_SKExtensions.m 2025-12-17 16:56:31 UTC (rev 15883)
@@ -47,7 +47,7 @@
if (point.x >= kPDFDestinationUnspecifiedValue || point.y >=
kPDFDestinationUnspecifiedValue) {
PDFPage *page = [self page];
NSRect bounds = NSZeroRect;
- NSSize size = pdfView ? [pdfView visibleContentRect].size : NSZeroSize;
+ NSSize size = pdfView ? [pdfView unobscuredContentRect].size :
NSZeroSize;
CGFloat zoomX = kPDFDestinationUnspecifiedValue, zoomY =
kPDFDestinationUnspecifiedValue;
BOOL override = YES;
NSInteger type = 0;
Modified: trunk/PDFView_SKExtensions.h
===================================================================
--- trunk/PDFView_SKExtensions.h 2025-12-17 15:55:37 UTC (rev 15882)
+++ trunk/PDFView_SKExtensions.h 2025-12-17 16:56:31 UTC (rev 15883)
@@ -52,7 +52,7 @@
@property (nonatomic) CGFloat physicalScaleFactor;
@property (nonatomic, readonly) NSScrollView *scrollView;
@property (nonatomic, readonly) NSArray<PDFPage *> *displayedPages;
-@property (nonatomic, readonly) NSRect visibleContentRect;
+@property (nonatomic, readonly) NSRect unobscuredContentRect;
- (BOOL)isPageAtIndexDisplayed:(NSUInteger)pageIndex;
- (BOOL)isPageAtIndexesDisplayed:(NSIndexSet *)pageIndexes;
Modified: trunk/PDFView_SKExtensions.m
===================================================================
--- trunk/PDFView_SKExtensions.m 2025-12-17 15:55:37 UTC (rev 15882)
+++ trunk/PDFView_SKExtensions.m 2025-12-17 16:56:31 UTC (rev 15883)
@@ -267,7 +267,7 @@
return displayedPages;
}
-- (NSRect)visibleContentRect {
+- (NSRect)unobscuredContentRect {
NSScrollView *scrollView = [self scrollView];
NSView *clipView = [scrollView contentView];
NSRect rect = [self convertRect:[clipView bounds] fromView:clipView];
@@ -323,7 +323,7 @@
}
- (BOOL)accessibilityPerformShowMenu {
- NSRect rect = [self visibleContentRect];
+ NSRect rect = [self unobscuredContentRect];
NSPoint point = NSMakePoint(NSMidX(rect), floor(NSMinY(rect) + 0.75 *
NSHeight(rect)));
NSEvent *event = [NSEvent mouseEventWithType:NSEventTypeRightMouseDown
location:[self convertPoint:point
toView:nil]
Modified: trunk/SKLoupeController.m
===================================================================
--- trunk/SKLoupeController.m 2025-12-17 15:55:37 UTC (rev 15882)
+++ trunk/SKLoupeController.m 2025-12-17 16:56:31 UTC (rev 15883)
@@ -176,7 +176,7 @@
}
- (void)update {
- NSRect visibleRect = [pdfView convertRectToScreen:[pdfView
visibleContentRect]];
+ NSRect visibleRect = [pdfView convertRectToScreen:[pdfView
unobscuredContentRect]];
NSPoint mouseLoc = [NSEvent mouseLocation];
if (NSPointInRect(mouseLoc, visibleRect)) {
@@ -219,7 +219,7 @@
- (void)updateContents {
NSWindow *window = [self window];
if ([window parentWindow]) {
- if (level > 2 && NSEqualSizes([window frame].size, [pdfView
visibleContentRect].size) == NO)
+ if (level > 2 && NSEqualSizes([window frame].size, [pdfView
unobscuredContentRect].size) == NO)
[self update];
else
[layer setNeedsDisplay];
@@ -240,7 +240,7 @@
- (void)drawLayer:(CALayer *)aLayer inContext:(CGContextRef)context {
NSPoint mouseLoc = [pdfView convertPointFromScreen:[NSEvent
mouseLocation]];
- if (NSPointInRect(mouseLoc, [pdfView visibleContentRect]) == NO)
+ if (NSPointInRect(mouseLoc, [pdfView unobscuredContentRect]) == NO)
return;
NSRect magRect = [pdfView convertRectFromScreen:[[self window] frame]];
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2025-12-17 15:55:37 UTC (rev 15882)
+++ trunk/SKPDFView.m 2025-12-17 16:56:31 UTC (rev 15883)
@@ -372,7 +372,7 @@
[self removePDFToolTipRects];
if ([self document] && [self window]) {
- NSRect visibleRect = [self visibleContentRect];
+ NSRect visibleRect = [self unobscuredContentRect];
NSView *docView = [self documentView];
BOOL hasLinkToolTips = toolMode != SKToolModeMagnify;
NSPoint mouseLoc = [docView convertPointFromScreen:[NSEvent
mouseLocation]];
@@ -535,7 +535,7 @@
[[highlightLayerController layer] removeFromSuperlayer];
}
CALayer *layer = [[CALayer alloc] init];
- [layer setFrame:NSRectToCGRect([self visibleContentRect])];
+ [layer setFrame:NSRectToCGRect([self unobscuredContentRect])];
[layer setBounds:[layer frame]];
[layer setMasksToBounds:YES];
[layer setZPosition:1.0];
@@ -1032,7 +1032,7 @@
if ((lineAngle % 180)) {
rect = NSInsetRect(rect, 0.0, -20.0) ;
if (([self displayMode] & kPDFDisplaySinglePageContinuous)) {
- NSRect visibleRect = [self convertRect:[self
visibleContentRect] toPage:newPage];
+ NSRect visibleRect = [self convertRect:[self
unobscuredContentRect] toPage:newPage];
rect = NSInsetRect(rect, 0.0, - floor( ( NSHeight(visibleRect)
- NSHeight(rect) ) / 2.0 ) );
if (NSWidth(rect) <= NSWidth(visibleRect)) {
if (NSMinX(rect) > NSMinX(visibleRect))
@@ -1045,7 +1045,7 @@
} else {
rect = NSInsetRect(rect, -20.0, 0.0) ;
if (([self displayMode] & kPDFDisplaySinglePageContinuous)) {
- NSRect visibleRect = [self convertRect:[self
visibleContentRect] toPage:newPage];
+ NSRect visibleRect = [self convertRect:[self
unobscuredContentRect] toPage:newPage];
rect = NSInsetRect(rect, - floor( ( NSWidth(visibleRect) -
NSWidth(rect) ) / 2.0 ), 0.0 );
if (NSHeight(rect) <= NSHeight(visibleRect)) {
if (NSMinY(rect) > NSMinY(visibleRect))
@@ -1261,7 +1261,7 @@
NSPoint center = [self convertPoint:[[self window]
mouseLocationOutsideOfEventStream] fromView:nil];
// if the mouse was in the toolbar and there is a page below the
toolbar, we get a point outside of the visible rect
- page = NSMouseInRect(center, [self visibleContentRect], [self
isFlipped]) ? [self pageForPoint:center nearest:NO] : nil;
+ page = NSMouseInRect(center, [self unobscuredContentRect], [self
isFlipped]) ? [self pageForPoint:center nearest:NO] : nil;
if (page == nil) {
// Get center of the PDFView.
@@ -1320,7 +1320,7 @@
NSPoint center = [self convertPoint:[[self window]
mouseLocationOutsideOfEventStream] fromView:nil];
// if the mouse was in the toolbar and there is a page below
the toolbar, we get a point outside of the visible rect
- page = NSMouseInRect(center, [self visibleContentRect], [self
isFlipped]) ? [self pageForPoint:center nearest:NO] : nil;
+ page = NSMouseInRect(center, [self unobscuredContentRect],
[self isFlipped]) ? [self pageForPoint:center nearest:NO] : nil;
if (page == nil) {
// Get center of the PDFView.
@@ -1620,7 +1620,7 @@
if (flag) {
rewindPage = [self currentPage];
DISPATCH_MAIN_AFTER_SEC(0.0, ^{
- if (rewindPage && [self pageForPoint:SKCenterPoint([self
visibleContentRect]) nearest:NO] != rewindPage)
+ if (rewindPage && [self pageForPoint:SKCenterPoint([self
unobscuredContentRect]) nearest:NO] != rewindPage)
[self rewind];
});
DISPATCH_MAIN_AFTER_SEC(0.25, ^{
@@ -2658,7 +2658,7 @@
NSPoint center = [context isKindOfClass:[NSValue class]] ? [context
pointValue] : [self convertPoint:[[self window]
mouseLocationOutsideOfEventStream] fromView:nil];
// if the mouse was in the toolbar and there is a page below the
toolbar, we get a point outside of the visible rect
- page = NSMouseInRect(center, [self visibleContentRect], [self
isFlipped]) ? [self pageForPoint:center nearest:NO] : nil;
+ page = NSMouseInRect(center, [self unobscuredContentRect], [self
isFlipped]) ? [self pageForPoint:center nearest:NO] : nil;
if (page == nil) {
// Get center of the PDFView.
@@ -3015,7 +3015,7 @@
[self setCurrentSelection:sel];
}
- visibleRect = [self convertRect:[self visibleContentRect] toPage:page];
+ visibleRect = [self convertRect:[self unobscuredContentRect]
toPage:page];
if (wasPageDisplayed == NO || NSContainsRect(visibleRect, lineRect) ==
NO) {
if (wasPageDisplayed && [self currentPage] != page)
@@ -4259,7 +4259,7 @@
CGMutablePathRef cgPath = NULL;
CGFloat scale = [self scaleFactor];
CAShapeLayer *layer = nil;
- NSRect boxBounds = NSIntersectionRect([page boundsForBox:[self
displayBox]], [self convertRect:[self visibleContentRect] toPage:page]);
+ NSRect boxBounds = NSIntersectionRect([page boundsForBox:[self
displayBox]], [self convertRect:[self unobscuredContentRect] toPage:page]);
CGAffineTransform t = CGAffineTransformMakeRotation(-M_PI_2 * [page
rotation] / 90.0);
layer = [CAShapeLayer layer];
// transform and place so that the path is in scaled page coordinates
@@ -5037,7 +5037,7 @@
NSEventModifierFlags modifiers = [theEvent deviceIndependentModifierFlags]
& ~NSEventModifierFlagCapsLock;
if ([[self document] isLocked]) {
- } else if (NSPointInRect(p, [self convertRect:[self visibleContentRect]
toView:nil]) == NO) {
+ } else if (NSPointInRect(p, [self convertRect:[self unobscuredContentRect]
toView:nil]) == NO) {
area = kPDFNoArea;
} else if ((modifiers == NSEventModifierFlagCommand || modifiers ==
(NSEventModifierFlagCommand | NSEventModifierFlagShift) || modifiers ==
(NSEventModifierFlagCommand | NSEventModifierFlagOption))) {
area = (area & kPDFPageArea) | SKSpecialToolArea;
Modified: trunk/SKSnapshotConfiguration.m
===================================================================
--- trunk/SKSnapshotConfiguration.m 2025-12-17 15:55:37 UTC (rev 15882)
+++ trunk/SKSnapshotConfiguration.m 2025-12-17 16:56:31 UTC (rev 15883)
@@ -49,7 +49,7 @@
- (instancetype)initWithPDFView:(PDFView *)pdfView {
self = [super init];
if (self) {
- NSRect bounds = [pdfView visibleContentRect];
+ NSRect bounds = [pdfView unobscuredContentRect];
size = bounds.size;
displayBox = [pdfView displayBox];
scaleFactor = [pdfView scaleFactor];
Modified: trunk/SKSnapshotPDFView.m
===================================================================
--- trunk/SKSnapshotPDFView.m 2025-12-17 15:55:37 UTC (rev 15882)
+++ trunk/SKSnapshotPDFView.m 2025-12-17 16:56:31 UTC (rev 15883)
@@ -243,7 +243,7 @@
- (void)handlePDFViewFrameChangedNotification:(NSNotification *)notification {
if ([self autoFits]) {
- NSRect clipRect = [self visibleContentRect];
+ NSRect clipRect = [self unobscuredContentRect];
NSRect rect = [self convertRect:autoFitRect fromPage:autoFitPage];
CGFloat factor = fmin(NSWidth(clipRect) / NSWidth(rect),
NSHeight(clipRect) / NSHeight(rect));
rect = [self convertRect:NSInsetRect(rect, 0.5 * (NSWidth(rect) -
NSWidth(clipRect) / factor), 0.5 * (NSHeight(rect) - NSHeight(clipRect) /
factor)) toPage:autoFitPage];
@@ -272,7 +272,7 @@
- (void)resetAutoFitRectIfNeeded {
if ([self autoFits]) {
autoFitPage = [self currentPage];
- autoFitRect = [self convertRect:[self visibleContentRect]
toPage:autoFitPage];
+ autoFitRect = [self convertRect:[self unobscuredContentRect]
toPage:autoFitPage];
}
}
@@ -470,7 +470,7 @@
- (void)copy:(id)sender {
NSMutableString *mutableString = [NSMutableString string];
- NSRect rect = [self visibleContentRect];
+ NSRect rect = [self unobscuredContentRect];
for (PDFPage *page in [self displayedPages]) {
PDFSelection *sel = [page selectionForRect:[self convertRect:rect
toPage:page]];
Modified: trunk/SKSnapshotWindowController.m
===================================================================
--- trunk/SKSnapshotWindowController.m 2025-12-17 15:55:37 UTC (rev 15882)
+++ trunk/SKSnapshotWindowController.m 2025-12-17 16:56:31 UTC (rev 15883)
@@ -135,7 +135,7 @@
- (void)updateString {
NSMutableString *mutableString = [NSMutableString string];
- NSRect rect = [pdfView visibleContentRect];
+ NSRect rect = [pdfView unobscuredContentRect];
for (PDFPage *page in [pdfView displayedPages]) {
PDFSelection *sel = [page selectionForRect:[pdfView convertRect:rect
toPage:page]];
@@ -383,7 +383,7 @@
#pragma mark Acessors
- (NSRect)bounds {
- return [pdfView convertRect:[pdfView visibleContentRect] toPage:[pdfView
currentPage]];
+ return [pdfView convertRect:[pdfView unobscuredContentRect]
toPage:[pdfView currentPage]];
}
- (NSUInteger)pageIndex {
@@ -532,7 +532,7 @@
#pragma mark Miniaturize / Deminiaturize
- (NSRect)miniaturizedRectForDockingRect:(NSRect)dockRect {
- NSRect sourceRect = [pdfView convertRect:[pdfView visibleContentRect]
toView:nil];
+ NSRect sourceRect = [pdfView convertRect:[pdfView unobscuredContentRect]
toView:nil];
NSRect targetRect;
NSSize windowSize = [[self window] frame].size;
NSSize thumbSize = [thumbnail size];
@@ -559,7 +559,7 @@
}
- (NSImage *)contentImage {
- NSRect rect = [pdfView visibleContentRect];
+ NSRect rect = [pdfView unobscuredContentRect];
NSRect bounds = [[self window] frame];
bounds.origin = NSZeroPoint;
NSImage *image = [[NSImage alloc] initWithSize:bounds.size];
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