Introduce Border struct analogous to Shadow
This commit is contained in:
parent
4d502012b3
commit
25f182f933
44 changed files with 382 additions and 424 deletions
|
|
@ -8,8 +8,8 @@ use crate::core::renderer;
|
|||
use crate::core::touch;
|
||||
use crate::core::widget::tree::{self, Tree};
|
||||
use crate::core::{
|
||||
Clipboard, Element, Layout, Length, Pixels, Point, Rectangle, Shell, Size,
|
||||
Widget,
|
||||
Border, Clipboard, Element, Layout, Length, Pixels, Point, Rectangle,
|
||||
Shell, Size, Widget,
|
||||
};
|
||||
|
||||
use std::ops::RangeInclusive;
|
||||
|
|
@ -398,7 +398,7 @@ pub fn draw<T, R>(
|
|||
width: offset + handle_width / 2.0,
|
||||
height: style.rail.width,
|
||||
},
|
||||
border_radius: style.rail.border_radius,
|
||||
border: Border::with_radius(style.rail.border_radius),
|
||||
..renderer::Quad::default()
|
||||
},
|
||||
style.rail.colors.0,
|
||||
|
|
@ -412,7 +412,7 @@ pub fn draw<T, R>(
|
|||
width: bounds.width - offset - handle_width / 2.0,
|
||||
height: style.rail.width,
|
||||
},
|
||||
border_radius: style.rail.border_radius,
|
||||
border: Border::with_radius(style.rail.border_radius),
|
||||
..renderer::Quad::default()
|
||||
},
|
||||
style.rail.colors.1,
|
||||
|
|
@ -426,9 +426,11 @@ pub fn draw<T, R>(
|
|||
width: handle_width,
|
||||
height: handle_height,
|
||||
},
|
||||
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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue