summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@serenityos.org>2022-04-29 11:39:55 +0100
committerAndreas Kling <kling@serenityos.org>2022-04-29 20:06:39 +0200
commiteaf24d2fce84703be96f8356cd2d044191738071 (patch)
tree577f09203b1f1fa430b54053a0938a099256eddd
parenteb76751a763d01a10c526384d62f39c5953a0588 (diff)
downloadserenity-eaf24d2fce84703be96f8356cd2d044191738071.zip
ThemeEditor: Update displayed alignment when loading a theme file
-rw-r--r--Userland/Applications/ThemeEditor/main.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/Userland/Applications/ThemeEditor/main.cpp b/Userland/Applications/ThemeEditor/main.cpp
index cfa088baee..3866b87880 100644
--- a/Userland/Applications/ThemeEditor/main.cpp
+++ b/Userland/Applications/ThemeEditor/main.cpp
@@ -285,6 +285,9 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
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), GUI::AllowCallback::No);
+ auto selected_alignment_role = alignment_combo_box.model()->index(alignment_combo_box.selected_index()).data(GUI::ModelRole::Custom).to_alignment_role();
+ alignment_input.set_selected_index((size_t)(preview_widget.preview_palette().alignment(selected_alignment_role), GUI::AllowCallback::No));
+
auto selected_flag_role = flag_combo_box.model()->index(flag_combo_box.selected_index()).data(GUI::ModelRole::Custom).to_flag_role();
flag_input.set_checked(preview_widget.preview_palette().flag(selected_flag_role), GUI::AllowCallback::No);