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 -8
View File
@@ -9,6 +9,7 @@ use crate::io::paper_catalog::{self, CustomPaper, Margins, PaperSize, PaperUnits
use crate::io::plot_device::PrinterCapabilities;
use crate::ui::style::common::muted_style;
use crate::ui::style::form;
use crate::ui::style::form::{hdivider, vseparator as vsep};
use iced::widget::{
button, checkbox, column, container, mouse_area, row, scrollable, text, text_input,
Space,
@@ -543,18 +544,10 @@ fn btn(accent: bool) -> impl Fn(&Theme, button::Status) -> button::Style {
form::button_style(accent)
}
fn hdivider<'a>(width: Length) -> Element<'a, Message> {
form::hdivider(width)
}
fn section_label<'a>(s: Cow<'static, str>) -> Element<'a, Message> {
form::section_label(s)
}
fn vsep<'a>(height: Length) -> Element<'a, Message> {
form::vseparator(height)
}
fn setup_row<'a>(
name: &'a str,
selected: &str,