aboutsummaryrefslogtreecommitdiff
path: root/src/scrollable.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/scrollable.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/scrollable.rs')
-rw-r--r--src/scrollable.rs12
1 files changed, 5 insertions, 7 deletions
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,
),