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

+4 -4
View File
@@ -428,8 +428,8 @@ fn properties(h: &Hatch) -> Vec<PropSection> {
title: t!("Geometry").into_owned(),
props: vec![
edit(t!("Elevation").as_ref(), "elevation", h.elevation),
ro(t!("Area").as_ref(), "area", format!("{:.4}", area)),
ro(t!("Cumulative area").as_ref(), "cumulative_area", format!("{:.4}", area)),
ro(t!("Area").as_ref(), "area", crate::entities::common::format_area(area)),
ro(t!("Cumulative area").as_ref(), "cumulative_area", crate::entities::common::format_area(area)),
],
},
PropSection {
@@ -537,8 +537,8 @@ fn properties(h: &Hatch) -> Vec<PropSection> {
title: t!("Geometry").into_owned(),
props: vec![
edit(t!("Elevation").as_ref(), "elevation", h.elevation),
ro(t!("Area").as_ref(), "area", format!("{:.4}", area)),
ro(t!("Cumulative area").as_ref(), "cumulative_area", format!("{:.4}", area)),
ro(t!("Area").as_ref(), "area", crate::entities::common::format_area(area)),
ro(t!("Cumulative area").as_ref(), "cumulative_area", crate::entities::common::format_area(area)),
],
},
];