From c0d79cb37b31d072193931bd599bc53c745a1230 Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Wed, 29 Nov 2023 22:20:19 -0500 Subject: [PATCH] refactor: udpate gradient angles for slider --- examples/gradient/Cargo.toml | 3 ++- widget/src/slider.rs | 2 +- widget/src/vertical_slider.rs | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/gradient/Cargo.toml b/examples/gradient/Cargo.toml index 2dea2c4f59..aef35ad7a2 100644 --- a/examples/gradient/Cargo.toml +++ b/examples/gradient/Cargo.toml @@ -5,4 +5,5 @@ edition = "2021" publish = false [dependencies] -iced = { path = "../.." } +iced = { path = "../..", features = ["winit", "wgpu"]} + diff --git a/widget/src/slider.rs b/widget/src/slider.rs index 1db3dda583..ed92429ed4 100644 --- a/widget/src/slider.rs +++ b/widget/src/slider.rs @@ -598,7 +598,7 @@ pub fn draw( border_color: Color::TRANSPARENT, }, if auto_angle { - gradient.angle = Radians::from(Degrees(180.0)); + gradient.angle = Radians::from(Degrees(90.0)); gradient } else { gradient diff --git a/widget/src/vertical_slider.rs b/widget/src/vertical_slider.rs index 46f48352ac..9931f06e43 100644 --- a/widget/src/vertical_slider.rs +++ b/widget/src/vertical_slider.rs @@ -444,7 +444,7 @@ pub fn draw( border_color: Color::TRANSPARENT, }, if auto_angle { - gradient.angle = Radians::from(Degrees(90.0)); + gradient.angle = Radians::from(Degrees(180.0)); gradient } else { gradient