diff options
author | 2024-01-20 13:29:25 +0100 | |
---|---|---|
committer | 2024-01-20 13:29:25 +0100 | |
commit | 25f182f933ea6b7c112c8f9a450a98dc9b9eebdd (patch) | |
tree | fdc498d705f033d3c432e6a06b8cd223dfd82633 /widget/src/vertical_slider.rs | |
parent | 4d502012b3e3ed9d9ef80f21078d53d182cdaa1b (diff) | |
download | iced-25f182f933ea6b7c112c8f9a450a98dc9b9eebdd.tar.gz iced-25f182f933ea6b7c112c8f9a450a98dc9b9eebdd.tar.bz2 iced-25f182f933ea6b7c112c8f9a450a98dc9b9eebdd.zip |
Introduce `Border` struct analogous to `Shadow`
Diffstat (limited to 'widget/src/vertical_slider.rs')
-rw-r--r-- | widget/src/vertical_slider.rs | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/widget/src/vertical_slider.rs b/widget/src/vertical_slider.rs index 7a461b08..52428c10 100644 --- a/widget/src/vertical_slider.rs +++ b/widget/src/vertical_slider.rs @@ -13,7 +13,8 @@ use crate::core::renderer; use crate::core::touch; use crate::core::widget::tree::{self, Tree}; use crate::core::{ - Clipboard, Element, Length, Pixels, Point, Rectangle, Shell, Size, Widget, + Border, Clipboard, Element, Length, Pixels, Point, Rectangle, Shell, Size, + Widget, }; /// An vertical bar and a handle that selects a single value from a range of @@ -396,7 +397,7 @@ pub fn draw<T, R>( width: style.rail.width, height: offset + handle_width / 2.0, }, - border_radius: style.rail.border_radius, + border: Border::with_radius(style.rail.border_radius), ..renderer::Quad::default() }, style.rail.colors.1, @@ -410,7 +411,7 @@ pub fn draw<T, R>( width: style.rail.width, height: bounds.height - offset - handle_width / 2.0, }, - border_radius: style.rail.border_radius, + border: Border::with_radius(style.rail.border_radius), ..renderer::Quad::default() }, style.rail.colors.0, @@ -424,9 +425,11 @@ pub fn draw<T, R>( width: handle_height, height: handle_width, }, - border_radius: handle_border_radius, - border_width: style.handle.border_width, - border_color: style.handle.border_color, + border: Border { + radius: handle_border_radius, + width: style.handle.border_width, + color: style.handle.border_color, + }, ..renderer::Quad::default() }, style.handle.color, |