[Bibdesk-commit] SF.net SVN: bibdesk:[27835] trunk/bibdesk/BDSKZoomableTextView.m
Revision: 27835 http://sourceforge.net/p/bibdesk/svn/27835 Author: hofman Date: 2022-08-24 14:21:05 + (Wed, 24 Aug 2022) Log Message: --- use scalePopUpButton frame Modified Paths: -- trunk/bibdesk/BDSKZoomableTextView.m Modified: trunk/bibdesk/BDSKZoomableTextView.m === --- trunk/bibdesk/BDSKZoomableTextView.m2022-08-24 06:30:21 UTC (rev 27834) +++ trunk/bibdesk/BDSKZoomableTextView.m2022-08-24 14:21:05 UTC (rev 27835) @@ -157,7 +157,7 @@ [scrollView setTranslatesAutoresizingMaskIntoConstraints:NO]; [containerView addSubview:scrollView]; -NSBox *backgroundView = [[[NSBox alloc] initWithFrame:[scrollView frame]] autorelease]; +NSBox *backgroundView = [[[NSBox alloc] initWithFrame:[scalePopUpButton frame]] autorelease]; [backgroundView setBoxType:NSBoxCustom]; [backgroundView setBorderType:NSNoBorder]; [backgroundView setTitlePosition:NSNoTitle]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ___ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit
[Bibdesk-commit] SF.net SVN: bibdesk:[27836] trunk/bibdesk
Revision: 27836 http://sourceforge.net/p/bibdesk/svn/27836 Author: hofman Date: 2022-08-24 14:34:37 + (Wed, 24 Aug 2022) Log Message: --- we don'tput zoomable pdfview in a content view anymore Modified Paths: -- trunk/bibdesk/BDSKPreviewer.h trunk/bibdesk/BDSKPreviewer.m trunk/bibdesk/BibDocument_UI.m Modified: trunk/bibdesk/BDSKPreviewer.h === --- trunk/bibdesk/BDSKPreviewer.h 2022-08-24 14:21:05 UTC (rev 27835) +++ trunk/bibdesk/BDSKPreviewer.h 2022-08-24 14:34:37 UTC (rev 27836) @@ -85,8 +85,6 @@ @property (nonatomic, assign) IBOutlet NSView *warningView; @property (nonatomic, assign) IBOutlet NSView *indicatorView; -@property (nonatomic, readonly) NSView *pdfContentView; - @property (nonatomic) CGFloat PDFScaleFactor; - (void)terminate; Modified: trunk/bibdesk/BDSKPreviewer.m === --- trunk/bibdesk/BDSKPreviewer.m 2022-08-24 14:21:05 UTC (rev 27835) +++ trunk/bibdesk/BDSKPreviewer.m 2022-08-24 14:34:37 UTC (rev 27836) @@ -71,7 +71,7 @@ @implementation BDSKPreviewer @synthesize pdfView, logView, tabView, progressIndicator, warningImageView, warningTextField, warningView, indicatorView; -@dynamic pdfContentView, PDFScaleFactor, visible; +@dynamic PDFScaleFactor, visible; static BDSKPreviewer *sharedPreviewer = nil; @@ -193,12 +193,6 @@ return pdfView; } -- (NSView *)pdfContentView; -{ -[self window]; -return tabView tabViewItemAtIndex:BDSKPreviewerTabIndexPDF] view] subviews] firstObject]; -} - - (CGFloat)PDFScaleFactor; { [self window]; Modified: trunk/bibdesk/BibDocument_UI.m === --- trunk/bibdesk/BibDocument_UI.m 2022-08-24 14:21:05 UTC (rev 27835) +++ trunk/bibdesk/BibDocument_UI.m 2022-08-24 14:34:37 UTC (rev 27836) @@ -88,6 +88,7 @@ #import "NSLayoutConstraint_BDSKExtensions.h" #import "BDSKGroupCellView.h" #import "NSVisualEffectView_BDSKForwardDeclarations.h" +#import "BDSKZoomablePDFView.h" #define BDSKDisableMigrationWarningKey @"BDSKDisableMigrationWarning" @@ -226,7 +227,7 @@ if(previewer == nil && [[NSUserDefaults standardUserDefaults] boolForKey:BDSKUsesTeXKey]){ previewer = [[BDSKPreviewer alloc] init]; [previewer setPDFScaleFactor:[self doubleForSetupKey:BDSKPreviewPDFScaleFactorKey defaultValue:0.0]]; -[[bottomPreviewTabView tabViewItemAtIndex:BDSKPreviewDisplayTeX] setView:[previewer pdfContentView]]; +[[bottomPreviewTabView tabViewItemAtIndex:BDSKPreviewDisplayTeX] setView:[previewer pdfView]]; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ___ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit
[Bibdesk-commit] SF.net SVN: bibdesk:[27837] trunk/bibdesk
Revision: 27837 http://sourceforge.net/p/bibdesk/svn/27837 Author: hofman Date: 2022-08-24 16:44:20 + (Wed, 24 Aug 2022) Log Message: --- Let background view of zoomable pdfview popup draw itself with color depending on global parameters. Modified Paths: -- trunk/bibdesk/BDSKZoomablePDFView.h trunk/bibdesk/BDSKZoomablePDFView.m Modified: trunk/bibdesk/BDSKZoomablePDFView.h === --- trunk/bibdesk/BDSKZoomablePDFView.h 2022-08-24 14:34:37 UTC (rev 27836) +++ trunk/bibdesk/BDSKZoomablePDFView.h 2022-08-24 16:44:20 UTC (rev 27837) @@ -43,7 +43,6 @@ @interface BDSKZoomablePDFView : PDFView { NSPopUpButton *scalePopUpButton; -BDSKBackgroundView *backgroundView; CGFloat startScale; } Modified: trunk/bibdesk/BDSKZoomablePDFView.m === --- trunk/bibdesk/BDSKZoomablePDFView.m 2022-08-24 14:34:37 UTC (rev 27836) +++ trunk/bibdesk/BDSKZoomablePDFView.m 2022-08-24 16:44:20 UTC (rev 27837) @@ -52,12 +52,7 @@ #endif -@interface BDSKBackgroundView : NSView { -NSColor *backgroundColor; -NSColor *edgeColor; -} -@property (nonatomic, retain) NSColor *backgroundColor; -@property (nonatomic, retain) NSColor *edgeColor; +@interface BDSKBackgroundView : NSView @end @@ -83,9 +78,7 @@ #pragma mark Instance methods - (void)dealloc { -[[NSNotificationCenter defaultCenter] removeObserver:self]; BDSKDESTROY(scalePopUpButton); -BDSKDESTROY(backgroundView); [super dealloc]; } @@ -221,25 +214,11 @@ - (void)updateColorFilters { if (BDSKHasDarkAppearance(NSApp)) { [[self scrollView] setContentFilters:[NSArray arrayWithObjects: [CIFilter filterWithName:@"CIColorMatrix" keysAndValues:@"inputRVector", [CIVector vectorWithX:1.0-LR Y:-LG Z:-LB W:0.0], @"inputGVector", [CIVector vectorWithX:-LR Y:1.0-LG Z:-LB W:0.0], @"inputBVector", [CIVector vectorWithX:-LR Y:-LG Z:1.0-LB W:0.0], @"inputBiasVector", [CIVector vectorWithX:1.0 Y:1.0 Z:1.0 W:0.0], nil], nil]]; -[backgroundView setContentFilters:[NSArray arrayWithObjects: [CIFilter filterWithName:@"CIColorMatrix" keysAndValues:@"inputRVector", [CIVector vectorWithX:1.0-LR Y:-LG Z:-LB W:0.0], @"inputGVector", [CIVector vectorWithX:-LR Y:1.0-LG Z:-LB W:0.0], @"inputBVector", [CIVector vectorWithX:-LR Y:-LG Z:1.0-LB W:0.0], @"inputAVector", [CIVector vectorWithX:0.0 Y:0.0 Z:0.0 W:1.0], @"inputBiasVector", [CIVector vectorWithX:1.0 Y:1.0 Z:1.0 W:0.0], nil], nil]]; } else { [[self scrollView] setContentFilters:[NSArray array]]; -[backgroundView setContentFilters:[NSArray array]]; } } -- (void)handleScrollerStyleDidChange:(NSNotification *)notification { -if ([NSScroller preferredScrollerStyle] == NSScrollerStyleLegacy) { -[backgroundView setBackgroundColor:[NSColor colorWithGenericGamma22White:0.98 alpha:1.0]]; -[backgroundView setEdgeColor:[NSColor colorWithGenericGamma22White:0.905 alpha:1.0]]; -} else { -[backgroundView setBackgroundColor:[NSColor whiteColor]]; -[backgroundView setEdgeColor:nil]; -} -[self updateColorFilters]; -[backgroundView setNeedsDisplay:YES]; -} - - (void)viewDidChangeEffectiveAppearance { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wpartial-availability" @@ -293,27 +272,25 @@ [scalePopUpButton setTarget:self]; [scalePopUpButton setAction:@selector(scalePopUpAction:)]; -backgroundView = [[BDSKBackgroundView alloc] initWithFrame:[scalePopUpButton frame]]; +NSView *backgroundView = [[[BDSKBackgroundView alloc] initWithFrame:[scalePopUpButton frame]] autorelease]; [backgroundView setTranslatesAutoresizingMaskIntoConstraints:NO]; [self addSubview:backgroundView]; [scalePopUpButton setTranslatesAutoresizingMaskIntoConstraints:NO]; -[self addSubview:scalePopUpButton]; +[backgroundView addSubview:scalePopUpButton]; -NSArray *constraints = [NSMutableArray arrayWithObjects: +[self addConstraints:[NSArray arrayWithObjects: [NSLayoutConstraint constraintWithLeadingMargin:0.0 forItem:backgroundView toItem:self], -[NSLayoutConstraint constraintWithBottomMargin:0.0 forItem:backgroundView toItem:self], -[NSLayoutConstraint constraintWithLeadingMargin:2.0 forItem:scalePopUpButton toItem:self], +[NSLayoutConstraint constraintWithBottomMargin:0.0 forItem:backgroundView toItem:self], nil]]; +[backgroundView addConstraints:[NSArray arrayWithObjects: +[NSLayoutConstraint constraintWithLeadingMargin:2.0 forItem:scalePopUpButton toItem:backgroundView], [NSLayoutConstraint constraintWithTrailingMargin:1.0 forItem:scalePopUpButton toItem:backgroundView], [NSLayoutConstraint constraintWithTopMargin:1.0 forItem:sca
[Bibdesk-commit] SF.net SVN: bibdesk:[27838] trunk/bibdesk/BDSKZoomablePDFView.m
Revision: 27838 http://sourceforge.net/p/bibdesk/svn/27838 Author: hofman Date: 2022-08-24 17:14:01 + (Wed, 24 Aug 2022) Log Message: --- draw bottom edge to simulate scroller Modified Paths: -- trunk/bibdesk/BDSKZoomablePDFView.m Modified: trunk/bibdesk/BDSKZoomablePDFView.m === --- trunk/bibdesk/BDSKZoomablePDFView.m 2022-08-24 16:44:20 UTC (rev 27837) +++ trunk/bibdesk/BDSKZoomablePDFView.m 2022-08-24 17:14:01 UTC (rev 27838) @@ -291,6 +291,8 @@ BDSKSetHasDefaultAppearance(self); BDSKSetHasLightAppearance([self scrollView]); + +[self updateColorFilters]; } } @@ -480,12 +482,15 @@ - (void)drawRect:(NSRect)rect { BOOL isDark = BDSKHasDarkAppearance(nil); +rect = [self bounds]; [NSGraphicsContext saveGraphicsState]; if ([NSScroller preferredScrollerStyle] == NSScrollerStyleLegacy) { [[NSColor colorWithGenericGamma22White:isDark ? 0.262 : 0.981 alpha:1.0] setFill]; [NSBezierPath fillRect:rect]; [[NSColor colorWithGenericGamma22White:isDark ? 0.499 : 0.905 alpha:1.0] setFill]; -[NSBezierPath fillRect:BDSKSliceRect([self bounds], 1.0, NSMaxYEdge)]; +[NSBezierPath fillRect:BDSKSliceRect(rect, 1.0, NSMaxYEdge)]; +[[NSColor colorWithGenericGamma22White:isDark ? 0.445 : 0.928 alpha:1.0] setFill]; +[NSBezierPath fillRect:BDSKSliceRect(rect, 1.0, NSMinYEdge)]; } else { [[NSColor colorWithGenericGamma22White:isDark ? 0.118 : 1.0 alpha:1.0] setFill]; [NSBezierPath fillRect:rect]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ___ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit
[Bibdesk-commit] SF.net SVN: bibdesk:[27839] trunk/bibdesk/BDSKZoomablePDFView.m
Revision: 27839 http://sourceforge.net/p/bibdesk/svn/27839 Author: hofman Date: 2022-08-24 23:11:06 + (Wed, 24 Aug 2022) Log Message: --- different edge colors forhigh contrast Modified Paths: -- trunk/bibdesk/BDSKZoomablePDFView.m Modified: trunk/bibdesk/BDSKZoomablePDFView.m === --- trunk/bibdesk/BDSKZoomablePDFView.m 2022-08-24 17:14:01 UTC (rev 27838) +++ trunk/bibdesk/BDSKZoomablePDFView.m 2022-08-24 23:11:06 UTC (rev 27839) @@ -485,11 +485,12 @@ rect = [self bounds]; [NSGraphicsContext saveGraphicsState]; if ([NSScroller preferredScrollerStyle] == NSScrollerStyleLegacy) { +BOOL isHighContrast = BDSKHasHighContrastAppearance(nil); [[NSColor colorWithGenericGamma22White:isDark ? 0.262 : 0.981 alpha:1.0] setFill]; [NSBezierPath fillRect:rect]; -[[NSColor colorWithGenericGamma22White:isDark ? 0.499 : 0.905 alpha:1.0] setFill]; +[[NSColor colorWithGenericGamma22White:isHighContrast ? (isDark ? 0.686 : 0.785) : (isDark ? 0.499 : 0.905) alpha:1.0] setFill]; [NSBezierPath fillRect:BDSKSliceRect(rect, 1.0, NSMaxYEdge)]; -[[NSColor colorWithGenericGamma22White:isDark ? 0.445 : 0.928 alpha:1.0] setFill]; +[[NSColor colorWithGenericGamma22White:isHighContrast ? (isDark ? 0.686 : 0.785) : (isDark ? 0.445 : 0.928) alpha:1.0] setFill]; [NSBezierPath fillRect:BDSKSliceRect(rect, 1.0, NSMinYEdge)]; } else { [[NSColor colorWithGenericGamma22White:isDark ? 0.118 : 1.0 alpha:1.0] setFill]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ___ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit
[Bibdesk-commit] SF.net SVN: bibdesk:[27840] trunk/bibdesk/Bibdesk.xcodeproj/ project.pbxproj
Revision: 27840 http://sourceforge.net/p/bibdesk/svn/27840 Author: amaxwell Date: 2022-08-25 06:30:23 + (Thu, 25 Aug 2022) Log Message: --- Change version to 5990 Modified Paths: -- trunk/bibdesk/Bibdesk.xcodeproj/project.pbxproj Modified: trunk/bibdesk/Bibdesk.xcodeproj/project.pbxproj === --- trunk/bibdesk/Bibdesk.xcodeproj/project.pbxproj 2022-08-24 23:11:06 UTC (rev 27839) +++ trunk/bibdesk/Bibdesk.xcodeproj/project.pbxproj 2022-08-25 06:30:23 UTC (rev 27840) @@ -6068,7 +6068,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = CE17EE7E0E24F27400DE06EA /* BibDesk-App.xcconfig */; buildSettings = { - CURRENT_PROJECT_VERSION = 5989; + CURRENT_PROJECT_VERSION = 5990; VERSIONING_SYSTEM = "apple-generic"; }; name = Debug; @@ -6077,7 +6077,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = CE17EE7E0E24F27400DE06EA /* BibDesk-App.xcconfig */; buildSettings = { - CURRENT_PROJECT_VERSION = 5989; + CURRENT_PROJECT_VERSION = 5990; VERSIONING_SYSTEM = "apple-generic"; }; name = Release; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ___ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit