mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 12:07:14 +02:00
DisplaySettings: Set window modified state
This commit is contained in:
committed by
Andreas Kling
parent
af01c6be0c
commit
d7190be3a3
Notes:
sideshowbarker
2024-07-17 12:00:31 +09:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/SerenityOS/serenity/commit/d7190be3a3 Pull-request: https://github.com/SerenityOS/serenity/pull/14006 Reviewed-by: https://github.com/MacDue
@@ -61,6 +61,7 @@ void BackgroundSettingsWidget::create_frame()
|
||||
}
|
||||
|
||||
m_monitor_widget->set_wallpaper(path);
|
||||
set_modified(true);
|
||||
};
|
||||
|
||||
m_context_menu = GUI::Menu::construct();
|
||||
@@ -93,6 +94,7 @@ void BackgroundSettingsWidget::create_frame()
|
||||
m_wallpaper_view->selection().clear();
|
||||
m_monitor_widget->set_wallpaper(path.value());
|
||||
m_background_settings_changed = true;
|
||||
set_modified(true);
|
||||
};
|
||||
|
||||
m_mode_combo = *find_descendant_of_type_named<GUI::ComboBox>("mode_combo");
|
||||
@@ -103,6 +105,7 @@ void BackgroundSettingsWidget::create_frame()
|
||||
m_monitor_widget->set_wallpaper_mode(m_modes.at(index.row()));
|
||||
m_background_settings_changed = !first_mode_change;
|
||||
first_mode_change = false;
|
||||
set_modified(true);
|
||||
};
|
||||
|
||||
m_color_input = *find_descendant_of_type_named<GUI::ColorInput>("color_input");
|
||||
@@ -113,6 +116,7 @@ void BackgroundSettingsWidget::create_frame()
|
||||
m_monitor_widget->set_background_color(m_color_input->color());
|
||||
m_background_settings_changed = !first_color_change;
|
||||
first_color_change = false;
|
||||
set_modified(true);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -133,7 +137,7 @@ void BackgroundSettingsWidget::load_current_settings()
|
||||
mode = "center";
|
||||
}
|
||||
m_monitor_widget->set_wallpaper_mode(mode);
|
||||
m_mode_combo->set_selected_index(m_modes.find_first_index(mode).value_or(0));
|
||||
m_mode_combo->set_selected_index(m_modes.find_first_index(mode).value_or(0), GUI::AllowCallback::No);
|
||||
|
||||
auto palette_desktop_color = palette().desktop_background();
|
||||
auto background_color = ws_config->read_entry("Background", "Color", "");
|
||||
@@ -144,7 +148,7 @@ void BackgroundSettingsWidget::load_current_settings()
|
||||
palette_desktop_color = opt_color.value();
|
||||
}
|
||||
|
||||
m_color_input->set_color(palette_desktop_color);
|
||||
m_color_input->set_color(palette_desktop_color, GUI::AllowCallback::No);
|
||||
m_monitor_widget->set_background_color(palette_desktop_color);
|
||||
m_background_settings_changed = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user