diff options
author | 2023-04-12 05:27:32 +0200 | |
---|---|---|
committer | 2023-04-12 05:27:32 +0200 | |
commit | 9b39a17628e92b66ac3649e879478ed23635fa76 (patch) | |
tree | 51f37d31de580235a0daf14ca37404b292fe2a82 | |
parent | 6e6804c5c9d0dba921f2e25d2c888b136d22d35e (diff) | |
download | iced-9b39a17628e92b66ac3649e879478ed23635fa76.tar.gz iced-9b39a17628e92b66ac3649e879478ed23635fa76.tar.bz2 iced-9b39a17628e92b66ac3649e879478ed23635fa76.zip |
Rename `Rail::size` to `width`
-rw-r--r-- | native/src/widget/slider.rs | 8 | ||||
-rw-r--r-- | native/src/widget/vertical_slider.rs | 8 | ||||
-rw-r--r-- | style/src/slider.rs | 4 | ||||
-rw-r--r-- | style/src/theme.rs | 2 |
4 files changed, 11 insertions, 11 deletions
diff --git a/native/src/widget/slider.rs b/native/src/widget/slider.rs index 5b26ae01..69c06140 100644 --- a/native/src/widget/slider.rs +++ b/native/src/widget/slider.rs @@ -401,9 +401,9 @@ pub fn draw<T, R>( renderer::Quad { bounds: Rectangle { x: bounds.x, - y: rail_y - style.rail.size / 2.0, + y: rail_y - style.rail.width / 2.0, width: offset, - height: style.rail.size, + height: style.rail.width, }, border_radius: [ style.rail.border_radius, @@ -422,9 +422,9 @@ pub fn draw<T, R>( renderer::Quad { bounds: Rectangle { x: bounds.x + offset, - y: rail_y - style.rail.size / 2.0, + y: rail_y - style.rail.width / 2.0, width: bounds.width - offset, - height: style.rail.size, + height: style.rail.width, }, border_radius: [ 0.0, diff --git a/native/src/widget/vertical_slider.rs b/native/src/widget/vertical_slider.rs index 5fb6022a..a06a200f 100644 --- a/native/src/widget/vertical_slider.rs +++ b/native/src/widget/vertical_slider.rs @@ -393,9 +393,9 @@ pub fn draw<T, R>( renderer.fill_quad( renderer::Quad { bounds: Rectangle { - x: rail_x - style.rail.size / 2.0, + x: rail_x - style.rail.width / 2.0, y: bounds.y, - width: style.rail.size, + width: style.rail.width, height: offset, }, border_radius: [ @@ -414,9 +414,9 @@ pub fn draw<T, R>( renderer.fill_quad( renderer::Quad { bounds: Rectangle { - x: rail_x - style.rail.size / 2.0, + x: rail_x - style.rail.width / 2.0, y: bounds.y + offset, - width: style.rail.size, + width: style.rail.width, height: bounds.height - offset, }, border_radius: [ diff --git a/style/src/slider.rs b/style/src/slider.rs index bb36a176..d5db1853 100644 --- a/style/src/slider.rs +++ b/style/src/slider.rs @@ -15,8 +15,8 @@ pub struct Appearance { pub struct Rail { /// The colors of the rail of the slider. pub colors: (Color, Color), - /// The height of a slider rail and the width of a vertical slider. - pub size: f32, + /// The width of the stroke of a slider rail. + pub width: f32, /// The border radius of the slider. pub border_radius: f32, } diff --git a/style/src/theme.rs b/style/src/theme.rs index 2eb825e6..b195940e 100644 --- a/style/src/theme.rs +++ b/style/src/theme.rs @@ -421,7 +421,7 @@ impl slider::StyleSheet for Theme { palette.primary.base.color, palette.primary.base.color, ), - size: 2.0, + width: 2.0, border_radius: 2.0, }, handle: slider::Handle { |