1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 09:37:34 +00:00

DisplaySettings: Remove unnecessary check for an overridden theme

Issue discussed in #16290
This commit is contained in:
Osamu-kj 2022-12-04 12:58:36 +01:00 committed by Linus Groh
parent 8677dbfc7f
commit ac556e2623

View file

@ -25,11 +25,10 @@ ThemesSettingsWidget::ThemesSettingsWidget(bool& background_settings_changed)
size_t current_theme_index;
auto current_theme_name = GUI::ConnectionToWindowServer::the().get_system_theme();
auto theme_overridden = GUI::ConnectionToWindowServer::the().is_system_theme_overridden();
m_theme_names.ensure_capacity(m_themes.size());
for (auto& theme_meta : m_themes) {
m_theme_names.append(theme_meta.name);
if (!theme_overridden && current_theme_name == theme_meta.name) {
if (current_theme_name == theme_meta.name) {
m_selected_theme = &theme_meta;
current_theme_index = m_theme_names.size() - 1;
}