From 7e8ccc45cc8cd41d5cfe73a32517f31d41cdb7f4 Mon Sep 17 00:00:00 2001 From: maxkadushkin Date: Tue, 26 Sep 2023 11:27:00 +0300 Subject: [PATCH] [desktop] fix bug 63875 --- apps/common/main/lib/controller/Desktop.js | 2 +- apps/common/main/lib/controller/Themes.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/common/main/lib/controller/Desktop.js b/apps/common/main/lib/controller/Desktop.js index 20238763a6..706bdf1835 100644 --- a/apps/common/main/lib/controller/Desktop.js +++ b/apps/common/main/lib/controller/Desktop.js @@ -146,7 +146,7 @@ define([ window.RendererProcessVariable.theme.system = opts.theme.system; if ( Common.UI.Themes.currentThemeId() == 'theme-system' ) - Common.UI.Themes.setTheme('theme-system'); + Common.UI.Themes.refreshTheme(true); } } else if (/element:show/.test(cmd)) { diff --git a/apps/common/main/lib/controller/Themes.js b/apps/common/main/lib/controller/Themes.js index 25785e45f9..e78289fe33 100644 --- a/apps/common/main/lib/controller/Themes.js +++ b/apps/common/main/lib/controller/Themes.js @@ -510,6 +510,8 @@ define([ } }, + refreshTheme: refresh_theme, + toggleTheme: function () { this.setTheme( this.isDarkTheme() ? id_default_light_theme : id_default_dark_theme ); }