Add crisp feature for enabling default quad snapping
This commit is contained in:
parent
12ac265694
commit
567b7d9e9f
14 changed files with 184 additions and 138 deletions
|
|
@ -16,6 +16,7 @@ workspace = true
|
|||
[features]
|
||||
auto-detect-theme = ["dep:dark-light"]
|
||||
advanced = []
|
||||
crisp = []
|
||||
|
||||
[dependencies]
|
||||
bitflags.workspace = true
|
||||
|
|
|
|||
|
|
@ -75,6 +75,9 @@ pub struct Quad {
|
|||
|
||||
/// The [`Shadow`] of the [`Quad`].
|
||||
pub shadow: Shadow,
|
||||
|
||||
/// Whether the [`Quad`] should be snapped to the pixel grid.
|
||||
pub snap: bool,
|
||||
}
|
||||
|
||||
impl Default for Quad {
|
||||
|
|
@ -83,6 +86,7 @@ impl Default for Quad {
|
|||
bounds: Rectangle::with_size(Size::ZERO),
|
||||
border: Border::default(),
|
||||
shadow: Shadow::default(),
|
||||
snap: cfg!(feature = "crisp"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue