1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:48:12 +00:00

DisplaySettings: Detect if a non-default color scheme is in use

This commit is contained in:
implicitfield 2023-03-17 15:34:50 +04:00 committed by Andreas Kling
parent 44b67db7ab
commit 1eb6484ebd

View file

@ -89,6 +89,10 @@ ErrorOr<void> ThemesSettingsWidget::setup_interface()
else {
color_scheme_combo.set_text("Custom");
m_color_scheme_is_file_based = false;
}
auto theme_config = TRY(Core::ConfigFile::open(m_selected_theme->path));
if (!selected_color_scheme_index.has_value() || GUI::Widget::palette().color_scheme_path() != theme_config->read_entry("Paths", "ColorScheme")) {
if (m_color_scheme_names.size() > 1) {
color_scheme_combo.set_enabled(true);
find_descendant_of_type_named<GUI::CheckBox>("custom_color_scheme_checkbox")->set_checked(true);