diff options
author | Ben Maxwell <macdue@dueutil.tech> | 2022-04-03 10:51:54 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-04-03 12:58:46 +0200 |
commit | 8070a982887be775ee657798452248ce42506d21 (patch) | |
tree | e9b781a33cb2b5ca856c445bbb785f61c5b2c658 /Userland/Applications/DisplaySettings/main.cpp | |
parent | e6ad55ab5328dc2bb5538c2ed7469b2a973f12ee (diff) | |
download | serenity-8070a982887be775ee657798452248ce42506d21.zip |
DisplaySettings+WindowServer: Allow updating theme without background
With this change you can now set the theme and background color at the
same time in the Display Settings. Before if both were changed
before hitting 'apply' the theme background color would overwrite
the custom background.
Diffstat (limited to 'Userland/Applications/DisplaySettings/main.cpp')
-rw-r--r-- | Userland/Applications/DisplaySettings/main.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Userland/Applications/DisplaySettings/main.cpp b/Userland/Applications/DisplaySettings/main.cpp index b8b2fef93a..154d9da393 100644 --- a/Userland/Applications/DisplaySettings/main.cpp +++ b/Userland/Applications/DisplaySettings/main.cpp @@ -27,9 +27,11 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) auto app_icon = GUI::Icon::default_icon("app-display-settings"); + bool background_settings_changed = false; + auto window = TRY(GUI::SettingsWindow::create("Display Settings")); - (void)TRY(window->add_tab<DisplaySettings::BackgroundSettingsWidget>("Background")); - (void)TRY(window->add_tab<DisplaySettings::ThemesSettingsWidget>("Themes")); + (void)TRY(window->add_tab<DisplaySettings::BackgroundSettingsWidget>("Background", background_settings_changed)); + (void)TRY(window->add_tab<DisplaySettings::ThemesSettingsWidget>("Themes", background_settings_changed)); (void)TRY(window->add_tab<DisplaySettings::FontSettingsWidget>("Fonts")); (void)TRY(window->add_tab<DisplaySettings::MonitorSettingsWidget>("Monitor")); (void)TRY(window->add_tab<DisplaySettings::DesktopSettingsWidget>("Workspaces")); |