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/scrollable.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/scrollable.rs') diff --git a/src/scrollable.rs b/src/scrollable.rs index 341f047..f7bed54 100644 --- a/src/scrollable.rs +++ b/src/scrollable.rs @@ -29,18 +29,16 @@ pub fn default(theme: &Theme, status: Status) -> Style { let active = Rail { background: None, scroller: Scroller { - color: surface.on_surface, + color: surface.text, border: border::rounded(400), }, border: Border::default(), }; let disabled = Rail { - background: Some(Background::Color(disabled_container( - surface.on_surface, - ))), + background: Some(Background::Color(disabled_container(surface.text))), scroller: Scroller { - color: disabled_text(surface.on_surface), + color: disabled_text(surface.text), border: border::rounded(400), }, ..active @@ -79,7 +77,7 @@ pub fn default(theme: &Theme, status: Status) -> Style { let hovered_rail = Rail { scroller: Scroller { color: mix( - surface.on_surface, + surface.text, surface.color, HOVERED_LAYER_OPACITY, ), @@ -115,7 +113,7 @@ pub fn default(theme: &Theme, status: Status) -> Style { let dragged_rail = Rail { scroller: Scroller { color: mix( - surface.on_surface, + surface.text, surface.color, PRESSED_LAYER_OPACITY, ), -- cgit v1.2.3