[macos] debug for themes

This commit is contained in:
maxkadushkin
2023-09-12 15:38:22 +03:00
parent 24a64a8124
commit 76bad483bc

View File

@ -104,12 +104,14 @@ int main(int argc, const char * argv[]) {
[[NSUserDefaults standardUserDefaults] setObject:uiTheme forKey:ASCUserUITheme];
}
NSString * systemColorScheme = [NSApplication isSystemDarkMode] ? @"dark" : @"light";
[[ASCEditorJSVariables instance] setParameter:@"uitheme" withString:uiTheme];
[[ASCSharedSettings sharedInstance] setSetting:([NSApplication isSystemDarkMode] ? @"dark" : @"light") forKey:kSettingsColorScheme];
[[ASCSharedSettings sharedInstance] setSetting:systemColorScheme forKey:kSettingsColorScheme];
[[ASCEditorJSVariables instance] applyParameters];
[[ASCEditorJSVariables instance] setVariable:@"theme" withObject:@{@"id":uiTheme,
@"system":[NSApplication isSystemDarkMode] ? @"dark" : @"light"}];
@"system":systemColorScheme,
@"type":systemColorScheme}];
[[ASCEditorJSVariables instance] apply];
// setup doc sign