Use shared unit formatters across property and dynamic views

This commit is contained in:
Marcel committed 2026-09-17 08:30:20 +02:00
1 parent ca0ee37d26
commit fca96b57de
10 files changed
+78 -65

No files matched your search

+6 -1
View File
@@ -3069,7 +3069,12 @@ impl DynInputCanvas {
fn box_content(b: &DynBox) -> String {
match b.role {
DynRole::Angle => format!("{}\u{00B0}", b.value),
// Live angle values already come from `format_angle`, which adds
// the drawing's appropriate marker (°, g, r, DMS, or bearing).
// A locked value is the user's raw numeric buffer and retains the
// legacy degree marker while it is being edited.
DynRole::Angle if b.locked => format!("{}\u{00B0}", b.value),
DynRole::Angle => b.value.clone(),
_ if b.label.is_empty() => b.value.clone(),
_ => format!("{}{}", b.label, b.value),
}