aboutsummaryrefslogtreecommitdiff
path: root/src/text_input.rs
diff options
context:
space:
mode:
authorPolesznyák Márk <contact@pml68.dev>2025-11-22 08:30:00 +0100
committerPolesznyák Márk <contact@pml68.dev>2025-11-22 08:30:00 +0100
commitff7e17988d5868c72cfb39d09ccf4efb05d3ceda (patch)
tree0734e0f409028e203532bfaea2c7372e2c646078 /src/text_input.rs
parentchore: add mailmap (diff)
downloadiced_material-ff7e17988d5868c72cfb39d09ccf4efb05d3ceda.tar.gz
feat!: combine `Primary`, `Secondary`, `Tertiary` and `Error`
Now only a singular `ColorQuartet` struct exists. Also rename some `Surface` and `Inverse` fields for consistency.
Diffstat (limited to '')
-rw-r--r--src/text_input.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/text_input.rs b/src/text_input.rs
index 4db220b..51bbb89 100644
--- a/src/text_input.rs
+++ b/src/text_input.rs
@@ -21,34 +21,34 @@ pub fn default(theme: &Theme, status: Status) -> Style {
let primary = theme.colors().primary;
let active = Style {
- background: Background::Color(surface.surface_container.highest),
+ background: Background::Color(surface.container.highest),
border: Border {
color: theme.colors().outline.color,
width: 1.0,
radius: 4.into(),
},
- icon: surface.on_surface_variant,
- placeholder: surface.on_surface_variant,
- value: surface.on_surface,
+ icon: surface.text_variant,
+ placeholder: surface.text_variant,
+ value: surface.text,
selection: disabled_text(primary.color),
};
match status {
Status::Active => active,
Status::Hovered => Style {
- border: active.border.color(surface.on_surface),
+ border: active.border.color(surface.text),
..active
},
Status::Disabled => Style {
background: Color::TRANSPARENT.into(),
border: Border {
- color: disabled_container(surface.on_surface),
+ color: disabled_container(surface.text),
..active.border
},
- icon: disabled_text(surface.on_surface),
- placeholder: disabled_text(surface.on_surface),
- value: disabled_text(surface.on_surface),
- selection: disabled_text(surface.on_surface),
+ icon: disabled_text(surface.text),
+ placeholder: disabled_text(surface.text),
+ value: disabled_text(surface.text),
+ selection: disabled_text(surface.text),
},
Status::Focused { .. } => Style {
border: Border {