mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:17:35 +00: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
1 changed files with 6 additions and 0 deletions
|
@ -173,6 +173,12 @@ int main(int argc, char** argv)
|
||||||
preview_widget.on_theme_load_from_file = [&](String const& new_path) {
|
preview_widget.on_theme_load_from_file = [&](String const& new_path) {
|
||||||
path = new_path;
|
path = new_path;
|
||||||
update_window_title();
|
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) {
|
auto save_to_result = [&](FileSystemAccessClient::Result const& result) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue