Rename Rail::size to width
This commit is contained in:
parent
6e6804c5c9
commit
9b39a17628
4 changed files with 11 additions and 11 deletions
|
|
@ -401,9 +401,9 @@ pub fn draw<T, R>(
|
||||||
renderer::Quad {
|
renderer::Quad {
|
||||||
bounds: Rectangle {
|
bounds: Rectangle {
|
||||||
x: bounds.x,
|
x: bounds.x,
|
||||||
y: rail_y - style.rail.size / 2.0,
|
y: rail_y - style.rail.width / 2.0,
|
||||||
width: offset,
|
width: offset,
|
||||||
height: style.rail.size,
|
height: style.rail.width,
|
||||||
},
|
},
|
||||||
border_radius: [
|
border_radius: [
|
||||||
style.rail.border_radius,
|
style.rail.border_radius,
|
||||||
|
|
@ -422,9 +422,9 @@ pub fn draw<T, R>(
|
||||||
renderer::Quad {
|
renderer::Quad {
|
||||||
bounds: Rectangle {
|
bounds: Rectangle {
|
||||||
x: bounds.x + offset,
|
x: bounds.x + offset,
|
||||||
y: rail_y - style.rail.size / 2.0,
|
y: rail_y - style.rail.width / 2.0,
|
||||||
width: bounds.width - offset,
|
width: bounds.width - offset,
|
||||||
height: style.rail.size,
|
height: style.rail.width,
|
||||||
},
|
},
|
||||||
border_radius: [
|
border_radius: [
|
||||||
0.0,
|
0.0,
|
||||||
|
|
|
||||||
|
|
@ -393,9 +393,9 @@ pub fn draw<T, R>(
|
||||||
renderer.fill_quad(
|
renderer.fill_quad(
|
||||||
renderer::Quad {
|
renderer::Quad {
|
||||||
bounds: Rectangle {
|
bounds: Rectangle {
|
||||||
x: rail_x - style.rail.size / 2.0,
|
x: rail_x - style.rail.width / 2.0,
|
||||||
y: bounds.y,
|
y: bounds.y,
|
||||||
width: style.rail.size,
|
width: style.rail.width,
|
||||||
height: offset,
|
height: offset,
|
||||||
},
|
},
|
||||||
border_radius: [
|
border_radius: [
|
||||||
|
|
@ -414,9 +414,9 @@ pub fn draw<T, R>(
|
||||||
renderer.fill_quad(
|
renderer.fill_quad(
|
||||||
renderer::Quad {
|
renderer::Quad {
|
||||||
bounds: Rectangle {
|
bounds: Rectangle {
|
||||||
x: rail_x - style.rail.size / 2.0,
|
x: rail_x - style.rail.width / 2.0,
|
||||||
y: bounds.y + offset,
|
y: bounds.y + offset,
|
||||||
width: style.rail.size,
|
width: style.rail.width,
|
||||||
height: bounds.height - offset,
|
height: bounds.height - offset,
|
||||||
},
|
},
|
||||||
border_radius: [
|
border_radius: [
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,8 @@ pub struct Appearance {
|
||||||
pub struct Rail {
|
pub struct Rail {
|
||||||
/// The colors of the rail of the slider.
|
/// The colors of the rail of the slider.
|
||||||
pub colors: (Color, Color),
|
pub colors: (Color, Color),
|
||||||
/// The height of a slider rail and the width of a vertical slider.
|
/// The width of the stroke of a slider rail.
|
||||||
pub size: f32,
|
pub width: f32,
|
||||||
/// The border radius of the slider.
|
/// The border radius of the slider.
|
||||||
pub border_radius: f32,
|
pub border_radius: f32,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -421,7 +421,7 @@ impl slider::StyleSheet for Theme {
|
||||||
palette.primary.base.color,
|
palette.primary.base.color,
|
||||||
palette.primary.base.color,
|
palette.primary.base.color,
|
||||||
),
|
),
|
||||||
size: 2.0,
|
width: 2.0,
|
||||||
border_radius: 2.0,
|
border_radius: 2.0,
|
||||||
},
|
},
|
||||||
handle: slider::Handle {
|
handle: slider::Handle {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue