Skip to content

Commit

Permalink
refactor: restore default style of slider
Browse files Browse the repository at this point in the history
  • Loading branch information
wash2 committed Sep 29, 2023
1 parent 41e5d20 commit f5ecdc2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 19 deletions.
2 changes: 1 addition & 1 deletion examples/slider/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ edition = "2021"
publish = false

[dependencies]
iced = { path = "../.." }
iced = { path = "../..", features = ["winit"] }
22 changes: 4 additions & 18 deletions style/src/theme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -440,24 +440,10 @@ impl slider::StyleSheet for Theme {

slider::Appearance {
rail: slider::Rail {
colors: RailBackground::Gradient {
gradient: Linear::new(Radians::from(Degrees(0.0)))
.add_stops((0u16..8).map(|h| ColorStop {
color: Color::from(
::palette::Srgba::from_color(
::palette::Hsv::new_srgb_const(
RgbHue::new(
f32::from(h) * 45.0,
),
1.0,
1.0,
),
),
),
offset: f32::from(h) / 7.0,
})),
auto_angle: true,
},
colors: RailBackground::Pair(
palette.primary.base.color,
palette.secondary.base.color,
),
width: 4.0,
border_radius: 2.0.into(),
},
Expand Down

0 comments on commit f5ecdc2

Please sign in to comment.