mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
DisplaySettings: Stop theme tab from overriding background color
Fixes #13448
This commit is contained in:
parent
d8ec9a5501
commit
e6ad55ab53
Notes:
sideshowbarker
2024-07-17 14:34:03 +09:00
Author: https://github.com/MacDue Commit: https://github.com/SerenityOS/serenity/commit/e6ad55ab53 Pull-request: https://github.com/SerenityOS/serenity/pull/13456 Issue: https://github.com/SerenityOS/serenity/issues/13448
1 changed files with 7 additions and 3 deletions
|
@ -14,14 +14,18 @@
|
|||
|
||||
namespace DisplaySettings {
|
||||
|
||||
static inline String current_system_theme()
|
||||
{
|
||||
return GUI::ConnectionToWindowServer::the().get_system_theme();
|
||||
}
|
||||
|
||||
ThemesSettingsWidget::ThemesSettingsWidget()
|
||||
{
|
||||
load_from_gml(themes_settings_gml);
|
||||
m_themes = Gfx::list_installed_system_themes();
|
||||
|
||||
auto current_theme_name = GUI::ConnectionToWindowServer::the().get_system_theme();
|
||||
|
||||
size_t current_theme_index;
|
||||
auto current_theme_name = current_system_theme();
|
||||
m_theme_names.ensure_capacity(m_themes.size());
|
||||
for (auto& theme_meta : m_themes) {
|
||||
m_theme_names.append(theme_meta.name);
|
||||
|
@ -45,7 +49,7 @@ ThemesSettingsWidget::ThemesSettingsWidget()
|
|||
|
||||
void ThemesSettingsWidget::apply_settings()
|
||||
{
|
||||
if (m_selected_theme)
|
||||
if (m_selected_theme && m_selected_theme->name != current_system_theme())
|
||||
VERIFY(GUI::ConnectionToWindowServer::the().set_system_theme(m_selected_theme->path, m_selected_theme->name));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue