aboutsummaryrefslogtreecommitdiff
path: root/src/text_editor.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_editor.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 'src/text_editor.rs')
-rw-r--r--src/text_editor.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/text_editor.rs b/src/text_editor.rs
index 168d1c8..8fea65f 100644
--- a/src/text_editor.rs
+++ b/src/text_editor.rs
@@ -21,14 +21,14 @@ 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(),
},
- placeholder: surface.on_surface_variant,
- value: surface.on_surface,
+ placeholder: surface.text_variant,
+ value: surface.text,
selection: disabled_text(primary.color),
};
@@ -36,7 +36,7 @@ pub fn default(theme: &Theme, status: Status) -> Style {
Status::Active => active,
Status::Hovered => Style {
border: Border {
- color: surface.on_surface,
+ color: surface.text,
..active.border
},
..active
@@ -53,13 +53,13 @@ pub fn default(theme: &Theme, status: Status) -> Style {
Status::Disabled => Style {
background: Color::TRANSPARENT.into(),
border: Border {
- color: disabled_container(surface.on_surface),
+ color: disabled_container(surface.text),
width: 1.0,
radius: border::radius(4),
},
- placeholder: disabled_text(surface.on_surface),
- value: disabled_text(surface.on_surface),
- selection: disabled_text(surface.on_surface),
+ placeholder: disabled_text(surface.text),
+ value: disabled_text(surface.text),
+ selection: disabled_text(surface.text),
},
}
}