mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-21 10:19:03 +03:00
ThemeEditor: Update value edit boxes when loading a theme file
Previously, these would continue to show the previously entered values, until you interacted with the ComboBoxes.
This commit is contained in:
parent
684f8a6b15
commit
e58db5592e
Notes:
sideshowbarker
2024-07-18 01:49:47 +09:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/SerenityOS/serenity/commit/e58db5592e0 Pull-request: https://github.com/SerenityOS/serenity/pull/10660
@ -173,6 +173,12 @@ int main(int argc, char** argv)
|
||||
preview_widget.on_theme_load_from_file = [&](String const& new_path) {
|
||||
path = new_path;
|
||||
update_window_title();
|
||||
|
||||
auto selected_color_role = color_combo_box.model()->index(color_combo_box.selected_index()).data(GUI::ModelRole::Custom).to_color_role();
|
||||
color_input.set_color(preview_widget.preview_palette().color(selected_color_role));
|
||||
|
||||
auto selected_metric_role = metric_combo_box.model()->index(metric_combo_box.selected_index()).data(GUI::ModelRole::Custom).to_metric_role();
|
||||
metric_input.set_value(preview_widget.preview_palette().metric(selected_metric_role), GUI::AllowCallback::No);
|
||||
};
|
||||
|
||||
auto save_to_result = [&](FileSystemAccessClient::Result const& result) {
|
||||
|
Loading…
Reference in New Issue
Block a user