From 25828cdcd745239c01d5073e2102aa7493031538 Mon Sep 17 00:00:00 2001 From: bflatastic Date: Fri, 30 Oct 2026 15:18:29 +0700 Subject: [PATCH] Anchor Inspector: the Close Path buttons share a row under their label --- crates/ui-egui/src/addons/pathtools.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/crates/ui-egui/src/addons/pathtools.rs b/crates/ui-egui/src/addons/pathtools.rs index 1e4486ffc..0ae31640a 100644 --- a/crates/ui-egui/src/addons/pathtools.rs +++ b/crates/ui-egui/src/addons/pathtools.rs @@ -130,9 +130,13 @@ pub fn show(app: &mut VectorcraftApp, ui: &mut Ui) { } }); set_pstate(ui.ctx(), COUNT, Some(count)); - widgets::label_row(ui, tl!("Close Path:"), LABEL_W + 16.0, |ui| { + // The label above and the three ways sharing the row: beside the label they overflow a narrow dock. + widgets::subheader(ui, "Close Path:"); + ui.horizontal(|ui| { + let n = CLOSE_MODES.len() as f32; + let each = ((width - ui.spacing().item_spacing.x * (n - 1.0)) / n).max(40.0); for (mode, label) in CLOSE_MODES { - if widgets::flat_button_fit(ui, tl!(label), 40.0).clicked() { + if widgets::flat_button(ui, tl!(label), each).clicked() { action = Some(("addon.pathtools.close", json!({ "mode": mode }))); } }