diff options
| author | Polesznyák Márk <contact@pml68.dev> | 2025-11-22 08:30:00 +0100 |
|---|---|---|
| committer | Polesznyák Márk <contact@pml68.dev> | 2025-11-22 08:30:00 +0100 |
| commit | ff7e17988d5868c72cfb39d09ccf4efb05d3ceda (patch) | |
| tree | 0734e0f409028e203532bfaea2c7372e2c646078 /src/slider.rs | |
| parent | chore: add mailmap (diff) | |
| download | iced_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/slider.rs')
| -rw-r--r-- | src/slider.rs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/slider.rs b/src/slider.rs index ae9ee4b..2146acb 100644 --- a/src/slider.rs +++ b/src/slider.rs @@ -46,17 +46,15 @@ pub fn default(theme: &Theme, status: Status) -> Style { let secondary = theme.colors().secondary; match status { - Status::Active => { - styled(primary.color, secondary.secondary_container, 12.0) - } + Status::Active => styled(primary.color, secondary.container, 12.0), Status::Hovered => styled( - mix(primary.color, surface.on_surface, HOVERED_LAYER_OPACITY), - secondary.secondary_container, + mix(primary.color, surface.text, HOVERED_LAYER_OPACITY), + secondary.container, 12.0, ), Status::Dragged => styled( - mix(primary.color, surface.on_surface, PRESSED_LAYER_OPACITY), - secondary.secondary_container, + mix(primary.color, surface.text, PRESSED_LAYER_OPACITY), + secondary.container, 11.0, ), } |
