fix(form): unify style manager field styling

This commit is contained in:
Karim Jerbi committed 2026-10-18 11:03:54 +01:00
1 parent ddbfb8f72b
commit 42ba7f12a0
7 files changed
+23 -107

No files matched your search

+1 -21
View File
@@ -3,7 +3,7 @@
use crate::app::Message;
use crate::t;
use crate::ui::style::common::muted_style;
use crate::ui::style::form::{hdivider, vsep};
use crate::ui::style::form::{field_style, hdivider, vsep};
use iced::widget::{button, column, container, row, scrollable, text, text_input, Space};
use iced::{Background, Border, Element, Theme};
use std::borrow::Cow;
@@ -62,26 +62,6 @@ fn btn_s(accent: bool) -> impl Fn(&Theme, button::Status) -> button::Style {
}
}
fn field_style(theme: &Theme, status: text_input::Status) -> text_input::Style {
let palette = theme.palette();
let border = match status {
text_input::Status::Focused { .. } => palette.primary.base.color,
_ => palette.background.neutral.color,
};
text_input::Style {
background: Background::Color(palette.background.base.color),
border: Border {
color: border,
width: 1.0,
radius: 3.0.into(),
},
icon: palette.background.base.text,
placeholder: palette.background.base.text.scale_alpha(0.48),
value: palette.background.base.text,
selection: palette.primary.base.color.scale_alpha(0.5),
}
}
/// Layer names bucketed by ACI (AutoCAD Color Index), index = ACI.
///
/// Pure function of `document.layers`: one entry per layer whose color is