Revision: 12445 http://sourceforge.net/p/skim-app/code/12445 Author: hofman Date: 2021-10-03 14:47:57 +0000 (Sun, 03 Oct 2021) Log Message: ----------- Insert common superclass for pdf view classes to implement dark mode support and add bug fixes so we don't need to swizzle
Modified Paths: -------------- trunk/PDFView_SKExtensions.m trunk/SKPDFView.h trunk/SKPDFView.m trunk/SKSecondaryPDFView.h trunk/SKSecondaryPDFView.m trunk/SKSnapshotPDFView.h trunk/SKSnapshotPDFView.m trunk/Skim.xcodeproj/project.pbxproj Added Paths: ----------- trunk/SKBasePDFView.h trunk/SKBasePDFView.m Modified: trunk/PDFView_SKExtensions.m =================================================================== --- trunk/PDFView_SKExtensions.m 2021-10-03 09:33:50 UTC (rev 12444) +++ trunk/PDFView_SKExtensions.m 2021-10-03 14:47:57 UTC (rev 12445) @@ -43,11 +43,9 @@ #import "PDFPage_SKExtensions.h" #import "PDFSelection_SKExtensions.h" #import "NSEvent_SKExtensions.h" -#import "SKRuntime.h" #import "NSGeometry_SKExtensions.h" #import "NSUserDefaults_SKExtensions.h" #import "SKStringConstants.h" -#import <SkimNotes/SkimNotes.h> #import "NSGraphics_SKExtensions.h" #import "SKApplication.h" #import "NSView_SKExtensions.h" @@ -54,18 +52,6 @@ #import "NSImage_SKExtensions.h" -#if SDK_BEFORE(10_12) - -@interface PDFView (SKSierraDeclarations) -- (void)drawPage:(PDFPage *)page toContext:(CGContextRef)context; -@end - -@interface PDFAnnotation (SKSierraDeclarations) -- (void)drawWithBox:(PDFDisplayBox)box inContext:(CGContextRef)context; -@end - -#endif - #if SDK_BEFORE(10_13) typedef NS_ENUM(NSInteger, PDFDisplayDirection) { @@ -86,175 +72,6 @@ @dynamic physicalScaleFactor, scrollView, displayedPages, minimumScaleFactor, maximumScaleFactor; -static void (*original_keyDown)(id, SEL, id) = NULL; -static void (*original_drawPage_toContext)(id, SEL, id, CGContextRef) = NULL; -static void (*original_goToRect_onPage)(id, SEL, NSRect, id) = NULL; -static void (*original_setCurrentSelection)(id, SEL, id) = NULL; -static void (*original_goToNextPage)(id, SEL, id) = NULL; -static void (*original_goToPreviousPage)(id, SEL, id) = NULL; -static void (*original_goToFirstPage)(id, SEL, id) = NULL; -static void (*original_goToLastPage)(id, SEL, id) = NULL; -static void (*original_goToPage)(id, SEL, id) = NULL; - -// on Yosemite, the arrow up/down and page up/down keys in non-continuous mode switch pages the wrong way -- (void)replacement_keyDown:(NSEvent *)theEvent { - unichar eventChar = [theEvent firstCharacter]; - NSUInteger modifiers = [theEvent standardModifierFlags]; - - if ((eventChar == SKSpaceCharacter) && ((modifiers & ~NSShiftKeyMask) == 0)) { - eventChar = modifiers == NSShiftKeyMask ? NSPageUpFunctionKey : NSPageDownFunctionKey; - modifiers = 0; - } - - if ((([self displayMode] & kPDFDisplaySinglePageContinuous) == 0) && - (eventChar == NSDownArrowFunctionKey || eventChar == NSUpArrowFunctionKey || eventChar == NSPageDownFunctionKey || eventChar == NSPageUpFunctionKey) && - (modifiers == 0)) { - - NSScrollView *scrollView = [self scrollView]; - NSClipView *clipView = [scrollView contentView]; - NSRect clipRect = [clipView bounds]; - BOOL flipped = [clipView isFlipped]; - CGFloat scroll = eventChar == NSUpArrowFunctionKey || eventChar == NSDownArrowFunctionKey ? [scrollView verticalLineScroll] : NSHeight([self convertRect:clipRect fromView:clipView]) - 6.0 * [scrollView verticalPageScroll]; - NSPoint point = [self convertPoint:clipRect.origin fromView:clipView]; - CGFloat margin = [self convertSize:NSMakeSize(1.0, 1.0) toView:clipView].height; - - if (eventChar == NSDownArrowFunctionKey || eventChar == NSPageDownFunctionKey) { - point.y -= scroll; - [clipView scrollPoint:[self convertPoint:point toView:clipView]]; - if (fabs(NSMinY(clipRect) - NSMinY([clipView bounds])) <= margin && [self canGoToNextPage]) { - [self goToNextPage:nil]; - NSRect docRect = [[scrollView documentView] frame]; - clipRect = [clipView bounds]; - clipRect.origin.y = flipped ? NSMinY(docRect) : NSMaxY(docRect) - NSHeight(clipRect); - [clipView scrollPoint:clipRect.origin]; - } - } else if (eventChar == NSUpArrowFunctionKey || eventChar == NSPageUpFunctionKey) { - point.y += scroll; - [clipView scrollPoint:[self convertPoint:point toView:clipView]]; - if (fabs(NSMinY(clipRect) - NSMinY([clipView bounds])) <= margin && [self canGoToPreviousPage]) { - [self goToPreviousPage:nil]; - NSRect docRect = [[scrollView documentView] frame]; - clipRect = [clipView bounds]; - clipRect.origin.y = flipped ? NSMaxY(docRect) - NSHeight(clipRect) : NSMinY(docRect); - [clipView scrollPoint:clipRect.origin]; - } - } - } else { - original_keyDown(self, _cmd, theEvent); - } -} - -- (void)replacement_drawPage:(PDFPage *)pdfPage toContext:(CGContextRef)context { - original_drawPage_toContext(self, _cmd, pdfPage, context); - - // On (High) Sierra note annotations don't draw at all - for (PDFAnnotation *annotation in [[[pdfPage annotations] copy] autorelease]) { - if ([annotation shouldDisplay] && ([annotation isNote] || [[annotation type] isEqualToString:SKNTextString])) - [annotation drawWithBox:[self displayBox] inContext:context]; - } -} - -- (void)replacement_goToRect:(NSRect)rect onPage:(PDFPage *)page { - NSView *docView = [self documentView]; - if ([self isPageAtIndexDisplayed:[page pageIndex]] == NO) - [self goToPage:page]; - [docView scrollRectToVisible:[self convertRect:[self convertRect:rect fromPage:page] toView:docView]]; -} - -- (void)replacement_setCurrentSelection:(PDFSelection *)currentSelection { - original_setCurrentSelection(self, _cmd, currentSelection ?: [[[PDFSelection alloc] initWithDocument:[self document]] autorelease]); -} - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wpartial-availability" - -static inline BOOL hasHorizontalLayout(PDFView *pdfView) { - return [pdfView displayMode] == kPDFDisplaySinglePageContinuous && [pdfView displayDirection] == kPDFDisplayDirectionHorizontal; -} - -#pragma clang diagnostic pop - -- (void)replacement_goToPreviousPage:(id)sender { - if (hasHorizontalLayout(self) && [self canGoToPreviousPage]) { - PDFDocument *doc = [self document]; - PDFPage *page = [doc pageAtIndex:[doc indexForPage:[self currentPage]] - 1]; - [self goToPage:page]; - } else { - original_goToPreviousPage(self, _cmd, sender); - } -} - -- (void)replacement_goToNextPage:(id)sender { - if (hasHorizontalLayout(self) && [self canGoToNextPage]) { - PDFDocument *doc = [self document]; - PDFPage *page = [doc pageAtIndex:[doc indexForPage:[self currentPage]] + 1]; - [self goToPage:page]; - } else { - original_goToNextPage(self, _cmd, sender); - } -} - -- (void)replacement_goToFirstPage:(id)sender { - if (hasHorizontalLayout(self) && [self canGoToFirstPage]) { - PDFDocument *doc = [self document]; - PDFPage *page = [doc pageAtIndex:0]; - [self goToPage:page]; - } else { - original_goToFirstPage(self, _cmd, sender); - } -} - -- (void)replacement_goToLastPage:(id)sender { - if (hasHorizontalLayout(self) && [self canGoToLastPage]) { - PDFDocument *doc = [self document]; - PDFPage *page = [doc pageAtIndex:[doc pageCount] - 1]; - [self goToPage:page]; - } else { - original_goToLastPage(self, _cmd, sender); - } -} - -- (void)replacement_goToPage:(PDFPage *)page { - if (hasHorizontalLayout(self)) { - NSRect bounds = [page boundsForBox:[self displayBox]]; - if ([self displaysPageBreaks]) { -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wpartial-availability" - NSEdgeInsets margins = [self pageBreakMargins]; -#pragma clang diagnostic pop - bounds = NSInsetRect(bounds, -margins.left, ([page rotation] % 180) == 0 ? -margins.bottom : -margins.left); - } - NSPoint point; - switch ([page rotation]) { - case 0: point = SKTopLeftPoint(bounds); break; - case 90: point = SKBottomLeftPoint(bounds); break; - case 180: point = SKBottomRightPoint(bounds); break; - case 270: point = SKTopRightPoint(bounds); break; - default: point = SKTopLeftPoint(bounds); break; - } - [self goToDestination:[[[PDFDestination alloc] initWithPage:page atPoint:point] autorelease]]; - } else { - original_goToPage(self, _cmd, page); - } -} - -+ (void)load { - if (RUNNING_BEFORE(10_12)) { - original_keyDown = (void (*)(id, SEL, id))SKReplaceInstanceMethodImplementationFromSelector(self, @selector(keyDown:), @selector(replacement_keyDown:)); - } else if (RUNNING(10_12)) { - original_drawPage_toContext = (void (*)(id, SEL, id, CGContextRef))SKReplaceInstanceMethodImplementationFromSelector(self, @selector(drawPage:toContext:), @selector(replacement_drawPage:toContext:)); - original_setCurrentSelection = (void (*)(id, SEL, id))SKReplaceInstanceMethodImplementationFromSelector(self, @selector(setCurrentSelection:), @selector(replacement_setCurrentSelection:)); - } else if (RUNNING(10_13)) { - original_goToRect_onPage = (void (*)(id, SEL, NSRect, id))SKReplaceInstanceMethodImplementationFromSelector(self, @selector(goToRect:onPage:), @selector(replacement_goToRect:onPage:)); - } else if (RUNNING_AFTER(10_14)) { - original_goToPreviousPage = (void (*)(id, SEL, id))SKReplaceInstanceMethodImplementationFromSelector(self, @selector(goToPreviousPage:), @selector(replacement_goToPreviousPage:)); - original_goToNextPage = (void (*)(id, SEL, id))SKReplaceInstanceMethodImplementationFromSelector(self, @selector(goToNextPage:), @selector(replacement_goToNextPage:)); - original_goToFirstPage = (void (*)(id, SEL, id))SKReplaceInstanceMethodImplementationFromSelector(self, @selector(goToFirstPage:), @selector(replacement_goToFirstPage:)); - original_goToLastPage = (void (*)(id, SEL, id))SKReplaceInstanceMethodImplementationFromSelector(self, @selector(goToLastPage:), @selector(replacement_goToLastPage:)); - original_goToPage = (void (*)(id, SEL, id))SKReplaceInstanceMethodImplementationFromSelector(self, @selector(goToPage:), @selector(replacement_goToPage:)); - } -} - static inline CGFloat physicalScaleFactorForView(NSView *view) { NSScreen *screen = [[view window] screen]; NSDictionary *deviceDescription = [screen deviceDescription]; Added: trunk/SKBasePDFView.h =================================================================== --- trunk/SKBasePDFView.h (rev 0) +++ trunk/SKBasePDFView.h 2021-10-03 14:47:57 UTC (rev 12445) @@ -0,0 +1,47 @@ +// +// SKBasePDFView.h +// Skim +// +// Created by Christiaan Hofman on 03/10/2021. +/* + This software is Copyright (c) 2019-2021 + Christiaan Hofman. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + - Neither the name of Christiaan Hofman nor the names of any + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import <Cocoa/Cocoa.h> +#import <Quartz/Quartz.h> + + +@interface SKBasePDFView : PDFView + +- (void)invertColorsInDarkModeDidChange; + +@end Added: trunk/SKBasePDFView.m =================================================================== --- trunk/SKBasePDFView.m (rev 0) +++ trunk/SKBasePDFView.m 2021-10-03 14:47:57 UTC (rev 12445) @@ -0,0 +1,308 @@ +// +// SKBasePDFView.m +// Skim +// +// Created by Christiaan Hofman on 03/10/2021. +/* + This software is Copyright (c) 2019-2021 + Christiaan Hofman. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + - Neither the name of Christiaan Hofman nor the names of any + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import "SKBasePDFView.h" +#import "SKStringConstants.h" +#import "PDFView_SKExtensions.h" +#import "NSGraphics_SKExtensions.h" +#import "NSUserDefaultsController_SKExtensions.h" +#import "NSEvent_SKExtensions.h" +#import <SkimNotes/SkimNotes.h> +#import "PDFAnnotation_SKExtensions.h" +#import "PDFPage_SKExtensions.h" + +static char SKBasePDFViewDefaultsObservationContext; + +#if SDK_BEFORE(10_12) + +@interface PDFView (SKSierraDeclarations) +- (void)drawPage:(PDFPage *)page toContext:(CGContextRef)context; +@end + +@interface PDFAnnotation (SKSierraDeclarations) +- (void)drawWithBox:(PDFDisplayBox)box inContext:(CGContextRef)context; +@end + +#endif + +@interface SKBasePDFView (BDSKPrivate) + +- (void)handleScrollerStyleChangedNotification:(NSNotification *)notification; + +@end + +@implementation SKBasePDFView + +#pragma mark Dark mode and color inversion + +// make sure we don't use the same method name as a superclass or a subclass +- (void)commonBaseInitialization { + SKSetHasDefaultAppearance(self); + SKSetHasLightAppearance([[self scrollView] contentView]); + if ([[NSUserDefaults standardUserDefaults] boolForKey:SKInvertColorsInDarkModeKey]) { + SKSetHasLightAppearance([self scrollView]); + [[self scrollView] setContentFilters:SKColorInvertFilters()]; + } + [self handleScrollerStyleChangedNotification:nil]; + + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleScrollerStyleChangedNotification:) + name:NSPreferredScrollerStyleDidChangeNotification object:nil]; + + if (RUNNING_AFTER(10_13)) + [[NSUserDefaultsController sharedUserDefaultsController] addObserver:self forKey:SKInvertColorsInDarkModeKey context:&SKBasePDFViewDefaultsObservationContext]; +} + +- (id)initWithFrame:(NSRect)frameRect { + self = [super initWithFrame:frameRect]; + if (self) { + [self commonBaseInitialization]; + } + return self; +} + +- (id)initWithCoder:(NSCoder *)decoder { + self = [super initWithCoder:decoder]; + if (self) { + [self commonBaseInitialization]; + } + return self; +} + +- (void)dealloc { + if (RUNNING_AFTER(10_13)) { + @try { [[NSUserDefaultsController sharedUserDefaultsController] removeObserver:self forKey:SKInvertColorsInDarkModeKey context:&SKBasePDFViewDefaultsObservationContext]; } + @catch (id e) {} + } + [[NSNotificationCenter defaultCenter] removeObserver:self]; + [super dealloc]; +} + +- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { + if (context == &SKBasePDFViewDefaultsObservationContext) + [self invertColorsInDarkModeDidChange]; + else + [super observeValueForKeyPath:keyPath ofObject:object change:change context:context]; +} + +- (void)invertColorsInDarkModeDidChange { + if ([[NSUserDefaults standardUserDefaults] boolForKey:SKInvertColorsInDarkModeKey]) { + SKSetHasLightAppearance([self scrollView]); + [[self scrollView] setContentFilters:SKColorInvertFilters()]; + } else { + SKSetHasDefaultAppearance([self scrollView]); + [[self scrollView] setContentFilters:[NSArray array]]; + } +} + +- (void)viewDidChangeEffectiveAppearance { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wpartial-availability" + [super viewDidChangeEffectiveAppearance]; +#pragma clang diagnostic pop + if ([[NSUserDefaults standardUserDefaults] boolForKey:SKInvertColorsInDarkModeKey]) + [[self scrollView] setContentFilters:SKColorInvertFilters()]; +} + +- (void)handleScrollerStyleChangedNotification:(NSNotification *)notification { + if ([NSScroller preferredScrollerStyle] == NSScrollerStyleLegacy) { + SKSetHasDefaultAppearance([[self scrollView] verticalScroller]); + SKSetHasDefaultAppearance([[self scrollView] horizontalScroller]); + } else { + SKSetHasLightAppearance([[self scrollView] verticalScroller]); + SKSetHasLightAppearance([[self scrollView] horizontalScroller]); + } +} + +#pragma mark Bug fixes + +- (void)keyDown:(NSEvent *)theEvent { + if (RUNNING_AFTER(10_11)) { + [super keyDown:theEvent]; + return; + } + + unichar eventChar = [theEvent firstCharacter]; + NSUInteger modifiers = [theEvent standardModifierFlags]; + + if ((eventChar == SKSpaceCharacter) && ((modifiers & ~NSShiftKeyMask) == 0)) { + eventChar = modifiers == NSShiftKeyMask ? NSPageUpFunctionKey : NSPageDownFunctionKey; + modifiers = 0; + } + + if ((([self displayMode] & kPDFDisplaySinglePageContinuous) == 0) && + (eventChar == NSDownArrowFunctionKey || eventChar == NSUpArrowFunctionKey || eventChar == NSPageDownFunctionKey || eventChar == NSPageUpFunctionKey) && + (modifiers == 0)) { + + NSScrollView *scrollView = [self scrollView]; + NSClipView *clipView = [scrollView contentView]; + NSRect clipRect = [clipView bounds]; + BOOL flipped = [clipView isFlipped]; + CGFloat scroll = eventChar == NSUpArrowFunctionKey || eventChar == NSDownArrowFunctionKey ? [scrollView verticalLineScroll] : NSHeight([self convertRect:clipRect fromView:clipView]) - 6.0 * [scrollView verticalPageScroll]; + NSPoint point = [self convertPoint:clipRect.origin fromView:clipView]; + CGFloat margin = [self convertSize:NSMakeSize(1.0, 1.0) toView:clipView].height; + + if (eventChar == NSDownArrowFunctionKey || eventChar == NSPageDownFunctionKey) { + point.y -= scroll; + [clipView scrollPoint:[self convertPoint:point toView:clipView]]; + if (fabs(NSMinY(clipRect) - NSMinY([clipView bounds])) <= margin && [self canGoToNextPage]) { + [self goToNextPage:nil]; + NSRect docRect = [[scrollView documentView] frame]; + clipRect = [clipView bounds]; + clipRect.origin.y = flipped ? NSMinY(docRect) : NSMaxY(docRect) - NSHeight(clipRect); + [clipView scrollPoint:clipRect.origin]; + } + } else if (eventChar == NSUpArrowFunctionKey || eventChar == NSPageUpFunctionKey) { + point.y += scroll; + [clipView scrollPoint:[self convertPoint:point toView:clipView]]; + if (fabs(NSMinY(clipRect) - NSMinY([clipView bounds])) <= margin && [self canGoToPreviousPage]) { + [self goToPreviousPage:nil]; + NSRect docRect = [[scrollView documentView] frame]; + clipRect = [clipView bounds]; + clipRect.origin.y = flipped ? NSMaxY(docRect) - NSHeight(clipRect) : NSMinY(docRect); + [clipView scrollPoint:clipRect.origin]; + } + } + } else { + [super keyDown:theEvent]; + } +} + + +- (void)drawPage:(PDFPage *)pdfPage toContext:(CGContextRef)context { + [super drawPage:pdfPage toContext:context]; + + if (RUNNING(10_12)) { + // On (High) Sierra note annotations don't draw at all + for (PDFAnnotation *annotation in [[[pdfPage annotations] copy] autorelease]) { + if ([annotation shouldDisplay] && ([annotation isNote] || [[annotation type] isEqualToString:SKNTextString])) + [annotation drawWithBox:[self displayBox] inContext:context]; + } + } +} + +- (void)replacement_goToRect:(NSRect)rect onPage:(PDFPage *)page { + if (RUNNING(10_13)) { + NSView *docView = [self documentView]; + if ([self isPageAtIndexDisplayed:[page pageIndex]] == NO) + [self goToPage:page]; + [docView scrollRectToVisible:[self convertRect:[self convertRect:rect fromPage:page] toView:docView]]; + } else { + [super goToRect:rect onPage:page]; + } +} + +- (void)replacement_setCurrentSelection:(PDFSelection *)currentSelection { + if (RUNNING(10_12) && currentSelection == nil) + currentSelection = [[[PDFSelection alloc] initWithDocument:[self document]] autorelease]; + [super setCurrentSelection:currentSelection]; +} + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wpartial-availability" + +static inline BOOL hasHorizontalLayout(PDFView *pdfView) { + return RUNNING_AFTER(10_14) && [pdfView displayMode] == kPDFDisplaySinglePageContinuous && [pdfView displayDirection] == kPDFDisplayDirectionHorizontal; +} + +#pragma clang diagnostic pop + +- (void)replacement_goToPreviousPage:(id)sender { + if (hasHorizontalLayout(self) && [self canGoToPreviousPage]) { + PDFDocument *doc = [self document]; + PDFPage *page = [doc pageAtIndex:[doc indexForPage:[self currentPage]] - 1]; + [self goToPage:page]; + } else { + [super goToPreviousPage:sender]; + } +} + +- (void)replacement_goToNextPage:(id)sender { + if (hasHorizontalLayout(self) && [self canGoToNextPage]) { + PDFDocument *doc = [self document]; + PDFPage *page = [doc pageAtIndex:[doc indexForPage:[self currentPage]] + 1]; + [self goToPage:page]; + } else { + [super goToNextPage:sender]; + } +} + +- (void)replacement_goToFirstPage:(id)sender { + if (hasHorizontalLayout(self) && [self canGoToFirstPage]) { + PDFDocument *doc = [self document]; + PDFPage *page = [doc pageAtIndex:0]; + [self goToPage:page]; + } else { + [super goToFirstPage:sender]; + } +} + +- (void)replacement_goToLastPage:(id)sender { + if (hasHorizontalLayout(self) && [self canGoToLastPage]) { + PDFDocument *doc = [self document]; + PDFPage *page = [doc pageAtIndex:[doc pageCount] - 1]; + [self goToPage:page]; + } else { + [super goToLastPage:sender]; + } +} + +- (void)replacement_goToPage:(PDFPage *)page { + if (hasHorizontalLayout(self)) { + NSRect bounds = [page boundsForBox:[self displayBox]]; + if ([self displaysPageBreaks]) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wpartial-availability" + NSEdgeInsets margins = [self pageBreakMargins]; +#pragma clang diagnostic pop + bounds = NSInsetRect(bounds, -margins.left, ([page rotation] % 180) == 0 ? -margins.bottom : -margins.left); + } + NSPoint point; + switch ([page rotation]) { + case 0: point = SKTopLeftPoint(bounds); break; + case 90: point = SKBottomLeftPoint(bounds); break; + case 180: point = SKBottomRightPoint(bounds); break; + case 270: point = SKTopRightPoint(bounds); break; + default: point = SKTopLeftPoint(bounds); break; + } + [self goToDestination:[[[PDFDestination alloc] initWithPage:page atPoint:point] autorelease]]; + } else { + [super goToPage:page]; + } +} + +@end Modified: trunk/SKPDFView.h =================================================================== --- trunk/SKPDFView.h 2021-10-03 09:33:50 UTC (rev 12444) +++ trunk/SKPDFView.h 2021-10-03 14:47:57 UTC (rev 12445) @@ -38,6 +38,7 @@ #import <Cocoa/Cocoa.h> #import <Quartz/Quartz.h> +#import "SKBasePDFView.h" #import "NSDocument_SKExtensions.h" extern NSString *SKPDFViewDisplaysAsBookChangedNotification; @@ -100,7 +101,7 @@ @class SKReadingBar, SKTransitionController, SKTypeSelectHelper, SKNavigationWindow, SKTextNoteEditor, SKSyncDot; -@interface SKPDFView : PDFView { +@interface SKPDFView : SKBasePDFView { SKToolMode toolMode; SKNoteType annotationMode; SKInteractionMode interactionMode; Modified: trunk/SKPDFView.m =================================================================== --- trunk/SKPDFView.m 2021-10-03 09:33:50 UTC (rev 12444) +++ trunk/SKPDFView.m 2021-10-03 14:47:57 UTC (rev 12445) @@ -247,7 +247,6 @@ - (void)handlePageChangedNotification:(NSNotification *)notification; - (void)handleScaleChangedNotification:(NSNotification *)notification; - (void)handleUndoGroupOpenedOrClosedNotification:(NSNotification *)notification; -- (void)handleScrollerStyleChangedNotification:(NSNotification *)notification; @end @@ -281,10 +280,7 @@ } + (NSArray *)defaultKeysToObserve { - if (RUNNING_AFTER(10_13)) - return [NSArray arrayWithObjects:SKReadingBarColorKey, SKReadingBarInvertKey, SKInvertColorsInDarkModeKey, nil]; - else - return [NSArray arrayWithObjects:SKReadingBarColorKey, SKReadingBarInvertKey, nil]; + return [NSArray arrayWithObjects:SKReadingBarColorKey, SKReadingBarInvertKey, nil]; } - (void)commonInitialization { @@ -341,17 +337,7 @@ name:NSUndoManagerDidOpenUndoGroupNotification object:nil]; [nc addObserver:self selector:@selector(handleUndoGroupOpenedOrClosedNotification:) name:NSUndoManagerDidCloseUndoGroupNotification object:nil]; - [nc addObserver:self selector:@selector(handleScrollerStyleChangedNotification:) - name:NSPreferredScrollerStyleDidChangeNotification object:nil]; [[NSUserDefaultsController sharedUserDefaultsController] addObserver:self forKeys:[[self class] defaultKeysToObserve] context:&SKPDFViewDefaultsObservationContext]; - - SKSetHasDefaultAppearance(self); - SKSetHasLightAppearance([[self scrollView] contentView]); - if ([[NSUserDefaults standardUserDefaults] boolForKey:SKInvertColorsInDarkModeKey]) { - SKSetHasLightAppearance([self scrollView]); - [[self scrollView] setContentFilters:SKColorInvertFilters()]; - } - [self handleScrollerStyleChangedNotification:nil]; } - (id)initWithFrame:(NSRect)frameRect { @@ -3017,16 +3003,6 @@ pdfvFlags.wantsNewUndoGroup = NO; } -- (void)handleScrollerStyleChangedNotification:(NSNotification *)notification { - if ([NSScroller preferredScrollerStyle] == NSScrollerStyleLegacy) { - SKSetHasDefaultAppearance([[self scrollView] verticalScroller]); - SKSetHasDefaultAppearance([[self scrollView] horizontalScroller]); - } else { - SKSetHasLightAppearance([[self scrollView] verticalScroller]); - SKSetHasLightAppearance([[self scrollView] horizontalScroller]); - } -} - - (void)handleKeyStateChangedNotification:(NSNotification *)notification { pdfvFlags.inKeyWindow = [[self window] isKeyWindow]; if (selectionPageIndex != NSNotFound) { @@ -3096,13 +3072,25 @@ #pragma clang diagnostic ignored "-Wpartial-availability" [super viewDidChangeEffectiveAppearance]; #pragma clang diagnostic pop - if ([[NSUserDefaults standardUserDefaults] boolForKey:SKInvertColorsInDarkModeKey]) { - [[self scrollView] setContentFilters:SKColorInvertFilters()]; - if (loupeWindow) + if (loupeWindow) { + if ([[NSUserDefaults standardUserDefaults] boolForKey:SKInvertColorsInDarkModeKey]) [[loupeWindow contentView] setContentFilters:SKColorInvertFilters()]; + [self updateLoupeBackgroundColor]; } - if (loupeWindow) +} + +- (void)invertColorsInDarkModeDidChange { + [super invertColorsInDarkModeDidChange]; + if (loupeWindow) { + if ([[NSUserDefaults standardUserDefaults] boolForKey:SKInvertColorsInDarkModeKey]) { + SKSetHasLightAppearance(loupeWindow); + [[loupeWindow contentView] setContentFilters:SKColorInvertFilters()]; + } else { + SKSetHasDefaultAppearance(loupeWindow); + [[loupeWindow contentView] setContentFilters:[NSArray array]]; + } [self updateLoupeBackgroundColor]; + } } #pragma mark Menu validation @@ -3192,23 +3180,6 @@ [[NSNotificationCenter defaultCenter] postNotificationName:SKPDFViewReadingBarDidChangeNotification object:self userInfo:[NSDictionary dictionaryWithObjectsAndKeys:[readingBar page], SKPDFViewOldPageKey, [readingBar page], SKPDFViewNewPageKey, nil]]; } - } else if ([key isEqualToString:SKInvertColorsInDarkModeKey]) { - if ([[NSUserDefaults standardUserDefaults] boolForKey:SKInvertColorsInDarkModeKey]) { - SKSetHasLightAppearance([self scrollView]); - [[[self scrollView] self] setContentFilters:SKColorInvertFilters()]; - if (loupeWindow) { - SKSetHasLightAppearance(loupeWindow); - [[loupeWindow contentView] setContentFilters:SKColorInvertFilters()]; - } - } else { - SKSetHasDefaultAppearance([self scrollView]); - [[[self scrollView] self] setContentFilters:[NSArray array]]; - if (loupeWindow) { - SKSetHasDefaultAppearance(loupeWindow); - [[loupeWindow contentView] setContentFilters:[NSArray array]]; - [self updateLoupeBackgroundColor]; - } - } } } else if (context == &SKPDFViewTransitionsObservationContext) { id oldValue = [change objectForKey:NSKeyValueChangeOldKey]; Modified: trunk/SKSecondaryPDFView.h =================================================================== --- trunk/SKSecondaryPDFView.h 2021-10-03 09:33:50 UTC (rev 12444) +++ trunk/SKSecondaryPDFView.h 2021-10-03 14:47:57 UTC (rev 12445) @@ -38,9 +38,10 @@ #import <Cocoa/Cocoa.h> #import <Quartz/Quartz.h> +#import "SKBasePDFView.h" -@interface SKSecondaryPDFView : PDFView { +@interface SKSecondaryPDFView : SKBasePDFView { NSPopUpButton *scalePopUpButton; NSPopUpButton *pagePopUpButton; NSButton *toolModeButton; Modified: trunk/SKSecondaryPDFView.m =================================================================== --- trunk/SKSecondaryPDFView.m 2021-10-03 09:33:50 UTC (rev 12444) +++ trunk/SKSecondaryPDFView.m 2021-10-03 14:47:57 UTC (rev 12445) @@ -53,10 +53,7 @@ #import "SKPDFView.h" #import "SKTopBarView.h" #import "NSColor_SKExtensions.h" -#import "NSGraphics_SKExtensions.h" -#import "NSUserDefaultsController_SKExtensions.h" -static char SKSecondaryPDFViewDefaultsObservationContext; @interface SKSecondaryPDFView (SKPrivate) @@ -78,7 +75,6 @@ - (void)handlePageChangedNotification:(NSNotification *)notification; - (void)handleDocumentDidUnlockNotification:(NSNotification *)notification; - (void)handlePDFViewScaleChangedNotification:(NSNotification *)notification; -- (void)handleScrollerStyleChangedNotification:(NSNotification *)notification; @end @@ -102,23 +98,11 @@ synchronizeZoom = NO; selectsText = [[NSUserDefaults standardUserDefaults] boolForKey:SKLastSecondarySelectsTextKey]; - SKSetHasDefaultAppearance(self); - SKSetHasLightAppearance([[self scrollView] contentView]); - if ([[NSUserDefaults standardUserDefaults] boolForKey:SKInvertColorsInDarkModeKey]) { - SKSetHasLightAppearance([self scrollView]); - [[self scrollView] setContentFilters:SKColorInvertFilters()]; - } - [self handleScrollerStyleChangedNotification:nil]; - - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleScrollerStyleChangedNotification:) - name:NSPreferredScrollerStyleDidChangeNotification object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handlePageChangedNotification:) name:PDFViewPageChangedNotification object:self]; if ([PDFView instancesRespondToSelector:@selector(magnifyWithEvent:)] == NO || [PDFView instanceMethodForSelector:@selector(magnifyWithEvent:)] == [NSView instanceMethodForSelector:@selector(magnifyWithEvent:)]) [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handlePDFViewScaleChangedNotification:) name:PDFViewScaleChangedNotification object:self]; - if (RUNNING_AFTER(10_13)) - [[NSUserDefaultsController sharedUserDefaultsController] addObserver:self forKey:SKInvertColorsInDarkModeKey context:&SKSecondaryPDFViewDefaultsObservationContext]; } - (id)initWithFrame:(NSRect)frameRect { @@ -138,10 +122,6 @@ } - (void)dealloc { - if (RUNNING_AFTER(10_13)) { - @try { [[NSUserDefaultsController sharedUserDefaultsController] removeObserver:self forKey:SKInvertColorsInDarkModeKey context:&SKSecondaryPDFViewDefaultsObservationContext]; } - @catch (id e) {} - } [[NSNotificationCenter defaultCenter] removeObserver:self]; SKDESTROY(synchronizedPDFView); SKDESTROY(scalePopUpButton); @@ -174,29 +154,6 @@ name:PDFDocumentDidUnlockNotification object:document]; } -- (void)viewDidChangeEffectiveAppearance { -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wpartial-availability" - [super viewDidChangeEffectiveAppearance]; -#pragma clang diagnostic pop - if ([[NSUserDefaults standardUserDefaults] boolForKey:SKInvertColorsInDarkModeKey]) - [[self scrollView] setContentFilters:SKColorInvertFilters()]; -} - -- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { - if (context == &SKSecondaryPDFViewDefaultsObservationContext) { - if ([[NSUserDefaults standardUserDefaults] boolForKey:SKInvertColorsInDarkModeKey]) { - SKSetHasLightAppearance([self scrollView]); - [[self scrollView] setContentFilters:SKColorInvertFilters()]; - } else { - SKSetHasDefaultAppearance([self scrollView]); - [[self scrollView] setContentFilters:[NSArray array]]; - } - } else { - [super observeValueForKeyPath:keyPath ofObject:object change:change context:context]; - } -} - #pragma mark Popup buttons - (void)reloadPagePopUpButton { @@ -853,14 +810,4 @@ [self setScaleFactor:fmax([self scaleFactor], SKMinDefaultScaleMenuFactor) adjustPopup:YES]; } -- (void)handleScrollerStyleChangedNotification:(NSNotification *)notification { - if ([NSScroller preferredScrollerStyle] == NSScrollerStyleLegacy) { - SKSetHasDefaultAppearance([[self scrollView] verticalScroller]); - SKSetHasDefaultAppearance([[self scrollView] horizontalScroller]); - } else { - SKSetHasLightAppearance([[self scrollView] verticalScroller]); - SKSetHasLightAppearance([[self scrollView] horizontalScroller]); - } -} - @end Modified: trunk/SKSnapshotPDFView.h =================================================================== --- trunk/SKSnapshotPDFView.h 2021-10-03 09:33:50 UTC (rev 12444) +++ trunk/SKSnapshotPDFView.h 2021-10-03 14:47:57 UTC (rev 12445) @@ -38,10 +38,11 @@ #import <Cocoa/Cocoa.h> #import <Quartz/Quartz.h> +#import "SKBasePDFView.h" @protocol SKSnapshotPDFViewDelegate; -@interface SKSnapshotPDFView : PDFView { +@interface SKSnapshotPDFView : SKBasePDFView { NSPopUpButton *scalePopUpButton; NSView *controlView; NSTrackingArea *trackingArea; Modified: trunk/SKSnapshotPDFView.m =================================================================== --- trunk/SKSnapshotPDFView.m 2021-10-03 09:33:50 UTC (rev 12444) +++ trunk/SKSnapshotPDFView.m 2021-10-03 14:47:57 UTC (rev 12445) @@ -50,10 +50,7 @@ #import "NSMenu_SKExtensions.h" #import "NSColor_SKExtensions.h" #import "SKPDFView.h" -#import "NSGraphics_SKExtensions.h" -#import "NSUserDefaultsController_SKExtensions.h" -static char SKSnapshotPDFViewDefaultsObservationContext; @interface SKSnapshotPDFView (SKPrivate) @@ -101,16 +98,6 @@ autoFitRect = NSZeroRect; minHistoryIndex = 0; - SKSetHasDefaultAppearance(self); - SKSetHasLightAppearance([[self scrollView] contentView]); - if ([[NSUserDefaults standardUserDefaults] boolForKey:SKInvertColorsInDarkModeKey]) { - SKSetHasLightAppearance([self scrollView]); - [[self scrollView] setContentFilters:SKColorInvertFilters()]; - } - [self handleScrollerStyleChangedNotification:nil]; - - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleScrollerStyleChangedNotification:) - name:NSPreferredScrollerStyleDidChangeNotification object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handlePDFViewFrameChangedNotification:) name:NSViewFrameDidChangeNotification object:self]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handlePDFViewFrameChangedNotification:) @@ -122,8 +109,6 @@ if ([PDFView instancesRespondToSelector:@selector(magnifyWithEvent:)] == NO || [PDFView instanceMethodForSelector:@selector(magnifyWithEvent:)] == [NSView instanceMethodForSelector:@selector(magnifyWithEvent:)]) [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handlePDFViewScaleChangedNotification:) name:PDFViewScaleChangedNotification object:self]; - if (RUNNING_AFTER(10_13)) - [[NSUserDefaultsController sharedUserDefaultsController] addObserver:self forKey:SKInvertColorsInDarkModeKey context:&SKSnapshotPDFViewDefaultsObservationContext]; } - (id)initWithFrame:(NSRect)frameRect { @@ -143,10 +128,6 @@ } - (void)dealloc { - if (RUNNING_AFTER(10_13)) { - @try { [[NSUserDefaultsController sharedUserDefaultsController] removeObserver:self forKey:SKInvertColorsInDarkModeKey context:&SKSnapshotPDFViewDefaultsObservationContext]; } - @catch (id e) {} - } [[NSNotificationCenter defaultCenter] removeObserver:self]; SKDESTROY(scalePopUpButton); SKDESTROY(controlView); @@ -279,29 +260,6 @@ [super setDelegate:newDelegate]; } -- (void)viewDidChangeEffectiveAppearance { -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wpartial-availability" - [super viewDidChangeEffectiveAppearance]; -#pragma clang diagnostic pop - if ([[NSUserDefaults standardUserDefaults] boolForKey:SKInvertColorsInDarkModeKey]) - [[self scrollView] setContentFilters:SKColorInvertFilters()]; -} - -- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { - if (context == &SKSnapshotPDFViewDefaultsObservationContext) { - if ([[NSUserDefaults standardUserDefaults] boolForKey:SKInvertColorsInDarkModeKey]) { - SKSetHasLightAppearance([self scrollView]); - [[self scrollView] setContentFilters:SKColorInvertFilters()]; - } else { - SKSetHasDefaultAppearance([self scrollView]); - [[self scrollView] setContentFilters:[NSArray array]]; - } - } else { - [super observeValueForKeyPath:keyPath ofObject:object change:change context:context]; - } -} - - (void)handlePDFViewFrameChangedNotification:(NSNotification *)notification { if ([self autoFits]) { NSView *clipView = [[self scrollView] contentView]; @@ -331,16 +289,6 @@ [self setScaleFactor:fmax([self scaleFactor], SKMinDefaultScaleMenuFactor) adjustPopup:YES]; } -- (void)handleScrollerStyleChangedNotification:(NSNotification *)notification { - if ([NSScroller preferredScrollerStyle] == NSScrollerStyleLegacy) { - SKSetHasDefaultAppearance([[self scrollView] verticalScroller]); - SKSetHasDefaultAppearance([[self scrollView] horizontalScroller]); - } else { - SKSetHasLightAppearance([[self scrollView] verticalScroller]); - SKSetHasLightAppearance([[self scrollView] horizontalScroller]); - } -} - - (void)resetAutoFitRectIfNeeded { if ([self autoFits]) { NSView *clipView = [[self scrollView] contentView]; Modified: trunk/Skim.xcodeproj/project.pbxproj =================================================================== --- trunk/Skim.xcodeproj/project.pbxproj 2021-10-03 09:33:50 UTC (rev 12444) +++ trunk/Skim.xcodeproj/project.pbxproj 2021-10-03 14:47:57 UTC (rev 12445) @@ -273,6 +273,7 @@ CEEB32831AC30ECA00BDB4E8 /* SKScroller.m in Sources */ = {isa = PBXBuildFile; fileRef = CEEB32821AC30ECA00BDB4E8 /* SKScroller.m */; }; CEEC0A0A0DCB2594003DD9B6 /* SKMainWindowController_UI.m in Sources */ = {isa = PBXBuildFile; fileRef = CEEC0A090DCB2594003DD9B6 /* SKMainWindowController_UI.m */; }; CEECD61C12E9E30B00B9E35E /* NSError_SKExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = CEECD61B12E9E30B00B9E35E /* NSError_SKExtensions.m */; }; + CEED148C2709EE4D00A8C4AA /* SKBasePDFView.m in Sources */ = {isa = PBXBuildFile; fileRef = CEED148B2709EE4D00A8C4AA /* SKBasePDFView.m */; }; CEEE7C520E7D3F2000B7B208 /* PDFAnnotationInk_SKExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = CEEE7C510E7D3F2000B7B208 /* PDFAnnotationInk_SKExtensions.m */; }; CEF39F39262ED6B20071606F /* SKThumbnailPageCell.m in Sources */ = {isa = PBXBuildFile; fileRef = CEF39F38262ED6B20071606F /* SKThumbnailPageCell.m */; }; CEF39F4E262ED7A40071606F /* SKThumbnailPageView.m in Sources */ = {isa = PBXBuildFile; fileRef = CEF39F4D262ED7A40071606F /* SKThumbnailPageView.m */; }; @@ -1153,6 +1154,8 @@ CEEC0A090DCB2594003DD9B6 /* SKMainWindowController_UI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SKMainWindowController_UI.m; sourceTree = "<group>"; }; CEECD61A12E9E30B00B9E35E /* NSError_SKExtensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSError_SKExtensions.h; sourceTree = "<group>"; }; CEECD61B12E9E30B00B9E35E /* NSError_SKExtensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSError_SKExtensions.m; sourceTree = "<group>"; }; + CEED148A2709EE4D00A8C4AA /* SKBasePDFView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SKBasePDFView.h; sourceTree = "<group>"; }; + CEED148B2709EE4D00A8C4AA /* SKBasePDFView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SKBasePDFView.m; sourceTree = "<group>"; }; CEEE7C500E7D3F2000B7B208 /* PDFAnnotationInk_SKExtensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PDFAnnotationInk_SKExtensions.h; sourceTree = "<group>"; }; CEEE7C510E7D3F2000B7B208 /* PDFAnnotationInk_SKExtensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PDFAnnotationInk_SKExtensions.m; sourceTree = "<group>"; }; CEF1D626117EFB760069E249 /* applehelp.init */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = applehelp.init; sourceTree = "<group>"; }; @@ -1776,6 +1779,8 @@ CE199DFC0D957A16009B2055 /* SKAnnotationTypeImageCell.m */, CE325590226F73810032390F /* SKAnnotationTypeImageView.h */, CE325591226F73810032390F /* SKAnnotationTypeImageView.m */, + CEED148A2709EE4D00A8C4AA /* SKBasePDFView.h */, + CEED148B2709EE4D00A8C4AA /* SKBasePDFView.m */, CE7A3A2B2269CBDE00F1B89B /* SKControlTableCellView.h */, CE7A3A2C2269CBDE00F1B89B /* SKControlTableCellView.m */, CECDD2960C5B68580026AAEC /* SKCenteredTextFieldCell.h */, @@ -2647,6 +2652,7 @@ CE325592226F73810032390F /* SKAnnotationTypeImageView.m in Sources */, 4530DCF70B27CACE007C59F4 /* SKPDFView.m in Sources */, CE546FC40B32D5DB00F8AFB6 /* SKNoteWindowController.m in Sources */, + CEED148C2709EE4D00A8C4AA /* SKBasePDFView.m in Sources */, CE48EFB121C3DC3900249D4C /* SKDownloadsWindow.m in Sources */, CEF39F4E262ED7A40071606F /* SKThumbnailPageView.m in Sources */, CE54898F0B35D50E00F8AFB6 /* SKInfoWindowController.m in Sources */, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ Skim-app-commit mailing list Skim-app-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/skim-app-commit