From f5ecdc2dd8d3495308c0a1e97d0bbbbd54f38076 Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Fri, 29 Sep 2023 12:48:24 -0400 Subject: [PATCH] refactor: restore default style of slider --- examples/slider/Cargo.toml | 2 +- style/src/theme.rs | 22 ++++------------------ 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/examples/slider/Cargo.toml b/examples/slider/Cargo.toml index 112d7cff5e..1143f90903 100644 --- a/examples/slider/Cargo.toml +++ b/examples/slider/Cargo.toml @@ -6,4 +6,4 @@ edition = "2021" publish = false [dependencies] -iced = { path = "../.." } +iced = { path = "../..", features = ["winit"] } diff --git a/style/src/theme.rs b/style/src/theme.rs index 029b619e59..f711eadf17 100644 --- a/style/src/theme.rs +++ b/style/src/theme.rs @@ -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(), },