diff --git a/native/src/widget/slider.rs b/native/src/widget/slider.rs index 70df37b6bb..4c5965051c 100644 --- a/native/src/widget/slider.rs +++ b/native/src/widget/slider.rs @@ -8,8 +8,7 @@ use crate::renderer; use crate::touch; use crate::widget::tree::{self, Tree}; use crate::{ - Clipboard, Color, Element, Layout, Length, Point, Rectangle, Shell, Size, - Widget, + Clipboard, Element, Layout, Length, Point, Rectangle, Shell, Size, Widget, }; use std::ops::RangeInclusive; @@ -409,7 +408,13 @@ pub fn draw( width: line_offset, height: style.rail.size, }, - border_radius: style.rail.border_radius.into(), + border_radius: [ + style.rail.border_radius, + 0.0, + 0.0, + style.rail.border_radius, + ] + .into(), border_width: style.rail.border_width, border_color: style.rail.border_color, }, @@ -424,7 +429,13 @@ pub fn draw( width: bounds.width - line_offset, height: style.rail.size, }, - border_radius: style.rail.border_radius.into(), + border_radius: [ + 0.0, + style.rail.border_radius, + style.rail.border_radius, + 0.0, + ] + .into(), border_width: style.rail.border_width, border_color: style.rail.border_color, }, diff --git a/native/src/widget/vertical_slider.rs b/native/src/widget/vertical_slider.rs index eda2c39cd8..eb72b6e3f3 100644 --- a/native/src/widget/vertical_slider.rs +++ b/native/src/widget/vertical_slider.rs @@ -8,8 +8,8 @@ pub use iced_style::slider::{Appearance, Handle, HandleShape, StyleSheet}; use crate::event::{self, Event}; use crate::widget::tree::{self, Tree}; use crate::{ - layout, mouse, renderer, touch, Clipboard, Color, Element, Layout, Length, - Point, Rectangle, Shell, Size, Widget, + layout, mouse, renderer, touch, Clipboard, Element, Layout, Length, Point, + Rectangle, Shell, Size, Widget, }; /// An vertical bar and a handle that selects a single value from a range of @@ -401,7 +401,13 @@ pub fn draw( width: style.rail.size, height: line_offset, }, - border_radius: style.rail.border_radius.into(), + border_radius: [ + style.rail.border_radius, + style.rail.border_radius, + 0.0, + 0.0, + ] + .into(), border_width: style.rail.border_width, border_color: style.rail.border_color, }, @@ -416,7 +422,13 @@ pub fn draw( width: style.rail.size, height: bounds.height - line_offset, }, - border_radius: style.rail.border_radius.into(), + border_radius: [ + 0.0, + 0.0, + style.rail.border_radius, + style.rail.border_radius, + ] + .into(), border_width: style.rail.border_width, border_color: style.rail.border_color, },