From 41508e7b240ed1f974dd0f262cb4f3a2234449f8 Mon Sep 17 00:00:00 2001 From: bflatastic Date: Sat, 31 Oct 2026 07:47:55 +0700 Subject: [PATCH] Path Precision Tools: the Shared Edges fields read like the others in the panel --- crates/ui-egui/src/addons/pathtools/shared_edge.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/crates/ui-egui/src/addons/pathtools/shared_edge.rs b/crates/ui-egui/src/addons/pathtools/shared_edge.rs index bc58183f3..2e1365ffa 100644 --- a/crates/ui-egui/src/addons/pathtools/shared_edge.rs +++ b/crates/ui-egui/src/addons/pathtools/shared_edge.rs @@ -5,13 +5,15 @@ use egui::Ui; use serde_json::{Value, json}; use vectorcraft_tools::addons::shared_edge::{COINCIDENCE, DIAMETER, DIAMETER_RANGE, ID, MAX_COINCIDENCE}; -use super::{LABEL_W, run}; +use super::run; use crate::VectorcraftApp; use crate::widgets; /// The menu's command: the tool, with the panel its values are in. pub const COMMAND: &str = "addon.pathtools.sharedEdgeTool"; const FIELD_W: f32 = 96.0; +/// Wide enough for "Coincidence:". +const LABEL_W: f32 = 80.0; /// Object › Plug-ins › Path Precision Tools › Shared Edge Merge Tool. pub fn open(app: &mut VectorcraftApp) -> Result { @@ -27,12 +29,12 @@ pub(super) fn section(app: &mut VectorcraftApp, ui: &mut Ui) { widgets::subheader(ui, "Shared Edges"); let mut set: Option = None; widgets::label_row(ui, tl!("Diameter:"), LABEL_W, |ui| { - if let Some(v) = widgets::range_field(ui, "shared-edge-diameter", diameter, DIAMETER_RANGE.0..=DIAMETER_RANGE.1, "pt", 2, FIELD_W) { + if let Some(v) = widgets::range_field(ui, "shared-edge-diameter", diameter, DIAMETER_RANGE.0..=DIAMETER_RANGE.1, " pt", 2, FIELD_W) { set = Some(json!({ "diameter": v })); } }); widgets::label_row(ui, tl!("Coincidence:"), LABEL_W, |ui| { - if let Some(v) = widgets::range_field(ui, "shared-edge-tolerance", tolerance, 0.0..=MAX_COINCIDENCE, "pt", 3, FIELD_W) { + if let Some(v) = widgets::range_field(ui, "shared-edge-tolerance", tolerance, 0.0..=MAX_COINCIDENCE, " pt", 3, FIELD_W) { set = Some(json!({ "tolerance": v })); } });