mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2026-01-08 01:21:42 +01:00
JBR-3327 [jbr-dev] Adjust mac window appearance according to AppleInterfaceStyle property
Set window appearance according to AppleInterfaceStyle default
(cherry picked from commit ffe5b5a504)
This commit is contained in:
@@ -1131,6 +1131,14 @@ JNI_COCOA_ENTER(env);
|
||||
|
||||
window.styleBits = newBits;
|
||||
|
||||
NSString *uiStyle = [[NSUserDefaults standardUserDefaults] stringForKey:@"AppleInterfaceStyle"];
|
||||
|
||||
if ([@"Dark" isEqualToString: uiStyle]) {
|
||||
[nsWindow setAppearance:[NSAppearance appearanceNamed:NSAppearanceNameVibrantDark]];
|
||||
} else {
|
||||
[nsWindow setAppearance:[NSAppearance appearanceNamed:NSAppearanceNameVibrantLight]];
|
||||
}
|
||||
|
||||
if (resized) {
|
||||
[window _deliverMoveResizeEvent];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user