summaryrefslogtreecommitdiff
path: root/Applications
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-04-21 18:40:27 +0200
committerAndreas Kling <kling@serenityos.org>2020-04-21 18:40:52 +0200
commit0fa7cf70b5606dc4a4335a8e406340a28a645c07 (patch)
treefb1f955c52878fe45d1be600ff64e0aadc0e7747 /Applications
parentb6d035aa05df71c7b71cda40517da789fe4b86c3 (diff)
downloadserenity-0fa7cf70b5606dc4a4335a8e406340a28a645c07.zip
WindowServer+SystemMenu: Check the current system theme on startup
Diffstat (limited to 'Applications')
-rw-r--r--Applications/SystemMenu/main.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Applications/SystemMenu/main.cpp b/Applications/SystemMenu/main.cpp
index 98ff7a0565..4398acb82d 100644
--- a/Applications/SystemMenu/main.cpp
+++ b/Applications/SystemMenu/main.cpp
@@ -185,6 +185,8 @@ NonnullRefPtr<GUI::Menu> build_system_menu()
quick_sort(g_themes, [](auto& a, auto& b) { return a.name < b.name; });
}
+ auto current_theme_name = GUI::WindowServerConnection::the().send_sync<Messages::WindowServer::GetSystemTheme>()->theme_name();
+
{
int theme_identifier = 0;
for (auto& theme : g_themes) {
@@ -194,6 +196,8 @@ NonnullRefPtr<GUI::Menu> build_system_menu()
auto response = GUI::WindowServerConnection::the().send_sync<Messages::WindowServer::SetSystemTheme>(theme.path, theme.name);
ASSERT(response->success());
});
+ if (theme.name == current_theme_name)
+ action->set_checked(true);
g_themes_group.add_action(action);
g_themes_menu->add_action(action);
++theme_identifier;