mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-30 05:28:50 +00:00
Avoid checking appearance by name, use bestMatchFromAppearancesWithNames for future-proofing.
This commit is contained in:
1 parent
3ed5f3875b
commit
077e2b155f
1 file changed
+2
-1
Vendored
+2
-1
@@ -253,7 +253,8 @@ static NSString *const SUUpdateAlertTouchBarIndentifier = @"" SPARKLE_BUNDLE_IDE
|
||||
if (@available(macOS 10.14, *))
|
||||
{
|
||||
WebPreferences *prefs = [self.releaseNotesView preferences];
|
||||
if ([self.releaseNotesView effectiveAppearance].name == NSAppearanceNameDarkAqua || [self.releaseNotesView effectiveAppearance].name == NSAppearanceNameAccessibilityHighContrastDarkAqua)
|
||||
NSAppearanceName bestAppearance = [self.releaseNotesView.effectiveAppearance bestMatchFromAppearancesWithNames:@[NSAppearanceNameAqua, NSAppearanceNameDarkAqua]];
|
||||
if ([bestAppearance isEqualToString:NSAppearanceNameDarkAqua])
|
||||
{
|
||||
// Set user stylesheet adapted to light on dark
|
||||
prefs.userStyleSheetEnabled = YES;
|
||||
|
||||
Reference in new issue
Block a user