Draft custom layout engine based on druid
This commit is contained in:
parent
2303111e09
commit
0240c3981b
38 changed files with 974 additions and 249 deletions
|
|
@ -1,7 +1,17 @@
|
|||
/// The strategy used to fill space in a specific dimension.
|
||||
#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Hash)]
|
||||
pub enum Length {
|
||||
Fill,
|
||||
Shrink,
|
||||
Units(u16),
|
||||
}
|
||||
|
||||
impl Length {
|
||||
pub fn fill_factor(&self) -> u16 {
|
||||
match self {
|
||||
Length::Fill => 1,
|
||||
Length::Shrink => 0,
|
||||
Length::Units(_) => 0,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue