Skip to content

Commit

Permalink
refactor: udpate gradient angles for slider
Browse files Browse the repository at this point in the history
  • Loading branch information
wash2 committed Nov 30, 2023
1 parent 15d345a commit c0d79cb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion examples/gradient/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ edition = "2021"
publish = false

[dependencies]
iced = { path = "../.." }
iced = { path = "../..", features = ["winit", "wgpu"]}

2 changes: 1 addition & 1 deletion widget/src/slider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ pub fn draw<T, R>(
border_color: Color::TRANSPARENT,
},
if auto_angle {
gradient.angle = Radians::from(Degrees(180.0));
gradient.angle = Radians::from(Degrees(90.0));
gradient
} else {
gradient
Expand Down
2 changes: 1 addition & 1 deletion widget/src/vertical_slider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ pub fn draw<T, R>(
border_color: Color::TRANSPARENT,
},
if auto_angle {
gradient.angle = Radians::from(Degrees(90.0));
gradient.angle = Radians::from(Degrees(180.0));
gradient
} else {
gradient
Expand Down

0 comments on commit c0d79cb

Please sign in to comment.