mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:07:45 +00:00
Taskbar: Handle an override theme being active
This patch makes taskbar react to an override theme being set by not having any theme in the menu selected.
This commit is contained in:
parent
976b6156d4
commit
ef7fbbcf70
1 changed files with 2 additions and 1 deletions
|
@ -247,9 +247,10 @@ ErrorOr<NonnullRefPtr<GUI::Menu>> build_system_menu(WindowRefence& window_ref)
|
||||||
if (g_themes_menu->is_visible())
|
if (g_themes_menu->is_visible())
|
||||||
return;
|
return;
|
||||||
auto current_theme_name = GUI::ConnectionToWindowServer::the().get_system_theme();
|
auto current_theme_name = GUI::ConnectionToWindowServer::the().get_system_theme();
|
||||||
|
auto theme_overridden = GUI::ConnectionToWindowServer::the().is_system_theme_overridden();
|
||||||
for (size_t index = 0; index < g_themes.size(); ++index) {
|
for (size_t index = 0; index < g_themes.size(); ++index) {
|
||||||
auto* action = g_themes_menu->action_at(index);
|
auto* action = g_themes_menu->action_at(index);
|
||||||
action->set_checked(action->text() == current_theme_name);
|
action->set_checked(!theme_overridden && action->text() == current_theme_name);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue