From ff7e17988d5868c72cfb39d09ccf4efb05d3ceda Mon Sep 17 00:00:00 2001 From: Polesznyák Márk Date: Sat, 22 Nov 2025 08:30:00 +0100 Subject: feat!: combine `Primary`, `Secondary`, `Tertiary` and `Error` Now only a singular `ColorQuartet` struct exists. Also rename some `Surface` and `Inverse` fields for consistency. --- src/radio.rs | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'src/radio.rs') 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 -- cgit v1.2.3