The Control bar's Align To button gives its picked row as its choice (IconButton::choice): it reads as the combo box "Align To:" with the choice as its value, as the Align panel's Align To does

This commit is contained in:
bflatastic
2026-11-23 18:58:24 +07:00
parent 7323bd60d8
commit 1f156be37f
+7 -1
View File
@@ -317,7 +317,13 @@ pub(crate) fn control_bar_strip(app: &mut VectorcraftApp, ui: &mut Ui) {
let distributes = if on_artboards(app) { artboards_distribute(app) } else { objects_aligned(app) > 1 };
ui.horizontal(|ui| {
bar_items(align_icons().map(|(_, b)| b)).show(ui);
let button = IconButton::new(IconId::new(icon)).label(name).tooltip(name).popup(PopupKind::Menu).popup_mark(PopupMark::Menu).show(ui);
let button = IconButton::new(IconId::new(icon))
.label(tl!("Align To:"))
.choice(name)
.tooltip(name)
.popup(PopupKind::Menu)
.popup_mark(PopupMark::Menu)
.show(ui);
Menu::new(tl!("Align To")).opened_by(&button.response, Trigger::Press).show(ui, |ui, _| {
for (id, _) in ALIGN_TO_COMMANDS {
MenuItem::command(CommandRef::new(id)).show(ui);