From 1c86defab5f5491b5f6b6e45faabf1b91ed195a3 Mon Sep 17 00:00:00 2001 From: Casper Storm Date: Tue, 23 May 2023 12:26:16 +0200 Subject: Extend border radius on relevant widgets --- widget/src/slider.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'widget/src/slider.rs') diff --git a/widget/src/slider.rs b/widget/src/slider.rs index 18a49665..d3c4a936 100644 --- a/widget/src/slider.rs +++ b/widget/src/slider.rs @@ -368,16 +368,16 @@ pub fn draw( style_sheet.active(style) }; - let (handle_width, handle_height, handle_border_radius) = match style - .handle - .shape - { - HandleShape::Circle { radius } => (radius * 2.0, radius * 2.0, radius), - HandleShape::Rectangle { - width, - border_radius, - } => (f32::from(width), bounds.height, border_radius), - }; + let (handle_width, handle_height, handle_border_radius) = + match style.handle.shape { + HandleShape::Circle { radius } => { + (radius * 2.0, radius * 2.0, radius.into()) + } + HandleShape::Rectangle { + width, + border_radius, + } => (f32::from(width), bounds.height, border_radius), + }; let value = value.into() as f32; let (range_start, range_end) = { -- cgit From 1234d528121265698f9f426ca89fc687dc95dc01 Mon Sep 17 00:00:00 2001 From: Casper Storm Date: Tue, 23 May 2023 15:28:45 +0200 Subject: clippy --- widget/src/slider.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'widget/src/slider.rs') diff --git a/widget/src/slider.rs b/widget/src/slider.rs index d3c4a936..2851d8c3 100644 --- a/widget/src/slider.rs +++ b/widget/src/slider.rs @@ -433,7 +433,7 @@ pub fn draw( width: handle_width, height: handle_height, }, - border_radius: handle_border_radius.into(), + border_radius: handle_border_radius, border_width: style.handle.border_width, border_color: style.handle.border_color, }, -- cgit