Introduce Border struct analogous to Shadow
This commit is contained in:
parent
4d502012b3
commit
25f182f933
44 changed files with 382 additions and 424 deletions
|
|
@ -10,7 +10,7 @@ use crate::core::text::{self, Text};
|
|||
use crate::core::touch;
|
||||
use crate::core::widget::Tree;
|
||||
use crate::core::{
|
||||
Clipboard, Length, Padding, Pixels, Point, Rectangle, Size, Vector,
|
||||
Border, Clipboard, Length, Padding, Pixels, Point, Rectangle, Size, Vector,
|
||||
};
|
||||
use crate::core::{Element, Shell, Widget};
|
||||
use crate::scrollable::{self, Scrollable};
|
||||
|
|
@ -306,9 +306,7 @@ where
|
|||
renderer.fill_quad(
|
||||
renderer::Quad {
|
||||
bounds,
|
||||
border_color: appearance.border_color,
|
||||
border_width: appearance.border_width,
|
||||
border_radius: appearance.border_radius,
|
||||
border: appearance.border,
|
||||
..renderer::Quad::default()
|
||||
},
|
||||
appearance.background,
|
||||
|
|
@ -513,11 +511,11 @@ where
|
|||
renderer.fill_quad(
|
||||
renderer::Quad {
|
||||
bounds: Rectangle {
|
||||
x: bounds.x + appearance.border_width,
|
||||
width: bounds.width - appearance.border_width * 2.0,
|
||||
x: bounds.x + appearance.border.width,
|
||||
width: bounds.width - appearance.border.width * 2.0,
|
||||
..bounds
|
||||
},
|
||||
border_radius: appearance.border_radius,
|
||||
border: Border::with_radius(appearance.border.radius),
|
||||
..renderer::Quad::default()
|
||||
},
|
||||
appearance.selected_background,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue