From 4114ad2c72ee66faeec0ab6b4afa1bab5f4c1662 Mon Sep 17 00:00:00 2001 From: Alex Andreev Date: Sat, 5 Mar 2022 12:41:26 +0300 Subject: [PATCH] Theme switch fixes Signed-off-by: Alex Andreev --- src/renderer/theme.store.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/renderer/theme.store.ts b/src/renderer/theme.store.ts index 838b95cb1c..059a7ac832 100644 --- a/src/renderer/theme.store.ts +++ b/src/renderer/theme.store.ts @@ -36,7 +36,7 @@ export class ThemeStore extends Singleton { "lens-light": lensLightThemeJson as Theme, }); - private osNativeTheme: "dark" | "light" | undefined; + @observable osNativeTheme: "dark" | "light" | undefined; @computed get activeThemeId(): ThemeId { return UserStore.getInstance().colorTheme; @@ -131,11 +131,12 @@ export class ThemeStore extends Singleton { } getThemeById(themeId: ThemeId): Theme { - return this.systemTheme ?? this.themes.get(themeId); + return this.themes.get(themeId); } protected applyTheme(themeId: ThemeId) { - const theme = this.getThemeById(themeId); + const theme = this.systemTheme ?? this.getThemeById(themeId); + const colors = Object.entries({ ...theme.colors, ...Object.fromEntries(this.terminalColors),