aboutsummaryrefslogtreecommitdiff
path: root/src/radio.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/radio.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/radio.rs')
-rw-r--r--src/radio.rs14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/radio.rs b/src/radio.rs
index 7fb7a3f..fcd6856 100644
--- a/src/radio.rs
+++ b/src/radio.rs
@@ -33,25 +33,21 @@ pub fn default(theme: &Theme, status: Status) -> Style {
border_color: if is_selected {
active.border_color
} else {
- surface.on_surface
+ surface.text
},
..active
},
Status::Hovered { is_selected } => Style {
- dot_color: mix(
- primary.color,
- surface.on_surface,
- HOVERED_LAYER_OPACITY,
- ),
+ dot_color: mix(primary.color, surface.text, HOVERED_LAYER_OPACITY),
border_color: if is_selected {
- mix(primary.color, surface.on_surface, HOVERED_LAYER_OPACITY)
+ mix(primary.color, surface.text, HOVERED_LAYER_OPACITY)
} else {
- disabled_text(surface.on_surface)
+ disabled_text(surface.text)
},
background: Background::Color(if is_selected {
Color {
a: HOVERED_LAYER_OPACITY,
- ..surface.on_surface
+ ..surface.text
}
} else {
Color::TRANSPARENT