diff src/sys/osx/dark_theme.mm @ 15:cde8f67a7c7d

*: update, megacommit :)
author Paper <mrpapersonic@gmail.com>
date Tue, 19 Sep 2023 22:36:08 -0400
parents 5c0397762b53
children 6d8da6e64d61
line wrap: on
line diff
--- a/src/sys/osx/dark_theme.mm	Tue Sep 19 16:33:07 2023 -0400
+++ b/src/sys/osx/dark_theme.mm	Tue Sep 19 22:36:08 2023 -0400
@@ -12,10 +12,8 @@
 
 bool IsInDarkTheme() {
 	if (@available(macOS 10.14, *)) {
-		auto appearance =
-			[NSApp.effectiveAppearance bestMatchFromAppearancesWithNames:@[
-				NSAppearanceNameAqua, NSAppearanceNameDarkAqua
-			]];
+		auto appearance = [NSApp.effectiveAppearance
+		    bestMatchFromAppearancesWithNames:@[ NSAppearanceNameAqua, NSAppearanceNameDarkAqua ]];
 		return [appearance isEqualToString:NSAppearanceNameDarkAqua];
 	}
 	return false;
@@ -24,16 +22,14 @@
 void SetToDarkTheme() {
 	// https://stackoverflow.com/questions/55925862/how-can-i-set-my-os-x-application-theme-in-code
 	if (@available(macOS 10.14, *)) {
-		[NSApp setAppearance:[NSAppearance
-								 appearanceNamed:NSAppearanceNameDarkAqua]];
+		[NSApp setAppearance:[NSAppearance appearanceNamed:NSAppearanceNameDarkAqua]];
 	}
 }
 
 void SetToLightTheme() {
 	// https://stackoverflow.com/questions/55925862/how-can-i-set-my-os-x-application-theme-in-code
 	if (__builtin_available(macOS 10.14, *)) {
-		[NSApp
-			setAppearance:[NSAppearance appearanceNamed:NSAppearanceNameAqua]];
+		[NSApp setAppearance:[NSAppearance appearanceNamed:NSAppearanceNameAqua]];
 	}
 }