Revision: 12434 http://sourceforge.net/p/skim-app/code/12434 Author: hofman Date: 2021-09-30 17:16:57 +0000 (Thu, 30 Sep 2021) Log Message: ----------- Don't (re)set color invert filters unnecessarily
Modified Paths: -------------- trunk/SKImageToolTipWindow.m Modified: trunk/SKImageToolTipWindow.m =================================================================== --- trunk/SKImageToolTipWindow.m 2021-09-30 16:28:13 UTC (rev 12433) +++ trunk/SKImageToolTipWindow.m 2021-09-30 17:16:57 UTC (rev 12434) @@ -84,6 +84,9 @@ context = nil; point = NSZeroPoint; + if ([[NSUserDefaults standardUserDefaults] boolForKey:SKInvertColorsInDarkModeKey]) + [[self contentView] setContentFilters:SKColorInvertFilters()]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(orderOut:) name:NSApplicationWillResignActiveNotification object:NSApp]; } @@ -114,10 +117,11 @@ if (RUNNING_AFTER(10_13)) { if (isOpaque) { - if ([backgroundView window]) + if ([backgroundView window]) { [self setContentView:[[[NSView alloc] init] autorelease]]; - if ([[NSUserDefaults standardUserDefaults] boolForKey:SKInvertColorsInDarkModeKey]) - [[self contentView] setContentFilters:SKColorInvertFilters()]; + if ([[NSUserDefaults standardUserDefaults] boolForKey:SKInvertColorsInDarkModeKey]) + [[self contentView] setContentFilters:SKColorInvertFilters()]; + } } else { if ([backgroundView window] == nil) { if (backgroundView == nil) { @@ -132,8 +136,6 @@ } [self setContentView:backgroundView]; } - if ([[NSUserDefaults standardUserDefaults] boolForKey:SKInvertColorsInDarkModeKey]) - [[self contentView] setContentFilters:[NSArray array]]; } } else if (isOpaque) { [self setBackgroundColor:[NSColor whiteColor]]; 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