1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:17:44 +00:00

DisplaySettings: Always save the background color to the config

Previously, you could notice that the background color isn't being
updated when you picked a small bitmap image with the 'center' mode.
This commit is contained in:
Karol Kosek 2021-11-21 21:10:46 +01:00 committed by Brian Gianforcaro
parent 65f3a259d2
commit e56ffd11ce

View file

@ -141,12 +141,8 @@ void BackgroundSettingsWidget::apply_settings()
{
Config::write_string("WindowManager", "Background", "Wallpaper", m_monitor_widget->wallpaper());
if (!m_monitor_widget->wallpaper().is_empty()) {
GUI::Desktop::the().set_wallpaper(m_monitor_widget->wallpaper());
} else {
GUI::Desktop::the().set_wallpaper("");
GUI::Desktop::the().set_background_color(m_color_input->text());
}
GUI::Desktop::the().set_wallpaper(m_monitor_widget->wallpaper());
GUI::Desktop::the().set_background_color(m_color_input->text());
GUI::Desktop::the().set_wallpaper_mode(m_monitor_widget->wallpaper_mode());
}