Check for standalone before using the system theme

pull/1449/head
dengr1065 2 years ago
parent fe35220145
commit d8a8bf7a58
No known key found for this signature in database
GPG Key ID: 445997E30179CC95

@ -6,10 +6,16 @@ export const THEMES = {
export let THEME = THEMES.light;
let currentThemePreference = "light";
THEMES.system = THEMES.light;
ipcRenderer.on("system-theme-updated", detectSystemTheme);
if (G_IS_STANDALONE) {
THEMES.system = THEMES.light;
ipcRenderer.on("system-theme-updated", detectSystemTheme);
}
export function detectSystemTheme() {
if (!G_IS_STANDALONE) {
return;
}
return ipcRenderer
.invoke("get-system-theme")
.then(theme => (THEMES.system = THEMES[theme]))

@ -291,7 +291,7 @@ class SettingsStorage {
this.soundVolume = 1.0;
this.musicVolume = 1.0;
this.theme = "system";
this.theme = G_IS_STANDALONE ? "system" : "light";
this.refreshRate = "60";
this.scrollWheelSensitivity = "regular";
this.movementSpeed = "regular";

Loading…
Cancel
Save