refactor(ui): centralize hdivider/vsep in style::form

Deduplicate the byte-identical 1px divider helpers previously copy-pasted across 6 modules. form::{hdivider, vseparator} is now canonical, with a form::vsep alias for legacy call sites. style_manager re-exports both so scale_manager and anno_object_scale imports keep working unchanged. Delete locals in style_manager, plotstyle, dimstyle, layout_manager, attribute_editor. Replace thin wrappers in window/plot with direct imports. no visual change.
This commit is contained in:
Karim Jerbi committed 2026-09-18 13:43:29 +01:00
1 parent 9545e36975
commit b8a7f5edfb
7 files changed
+12 -112

No files matched your search

+1 -14
View File
@@ -25,6 +25,7 @@ use std::borrow::Cow;
use std::fmt;
use crate::ui::properties::{lw_options, LwItem};
use crate::ui::style::form::hdivider;
const LABEL_W: f32 = 120.0;
@@ -161,20 +162,6 @@ fn field_style(theme: &Theme, status: text_input::Status) -> text_input::Style {
}
}
/// Horizontal 1px divider in the shared border colour (matches style windows).
fn hdivider<'a>(width: Length) -> Element<'a, Message> {
container(Space::new().width(width).height(1))
.width(width)
.height(1)
.style(|theme: &Theme| container::Style {
background: Some(Background::Color(
theme.palette().background.neutral.color
)),
..Default::default()
})
.into()
}
/// One `label : widget` row with a fixed-width label column.
fn field_row<'a>(
label: Cow<'static, str>,