From ab5b61c3fefa57c7f689a22f988c0929bbb5a515 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Offenh=C3=A4user?= Date: Thu, 9 Feb 2023 15:06:57 +0100 Subject: [PATCH] DisplaySettings: Capitalize fallback display mode when loading settings This setting was capitalized a while ago, except for this place where we fall back to "[C]center". This caused a crash in MonitorWidget. --- .../DisplaySettings/BackgroundSettingsWidget.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Userland/Applications/DisplaySettings/BackgroundSettingsWidget.cpp b/Userland/Applications/DisplaySettings/BackgroundSettingsWidget.cpp index ce37fcbbf2..d786da5fff 100644 --- a/Userland/Applications/DisplaySettings/BackgroundSettingsWidget.cpp +++ b/Userland/Applications/DisplaySettings/BackgroundSettingsWidget.cpp @@ -130,10 +130,10 @@ void BackgroundSettingsWidget::load_current_settings() m_monitor_widget->set_wallpaper(selected_wallpaper); } - auto mode = ws_config->read_entry("Background", "Mode", "center"); + auto mode = ws_config->read_entry("Background", "Mode", "Center"); if (!m_modes.contains_slow(mode)) { - warnln("Invalid background mode '{}' in WindowServer config, falling back to 'center'", mode); - mode = "center"; + warnln("Invalid background mode '{}' in WindowServer config, falling back to 'Center'", mode); + mode = "Center"; } m_monitor_widget->set_wallpaper_mode(mode); m_mode_combo->set_selected_index(m_modes.find_first_index(mode).value_or(0), GUI::AllowCallback::No);