Introduce Widget::size_hint and fix further layout inconsistencies
This commit is contained in:
parent
0322e820eb
commit
22226394f7
17 changed files with 210 additions and 123 deletions
|
|
@ -36,6 +36,12 @@ impl Length {
|
|||
Length::Fixed(_) => 0,
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns `true` iff the [`Length`] is either [`Length::Fill`] or
|
||||
// [`Length::FillPortion`].
|
||||
pub fn is_fill(&self) -> bool {
|
||||
self.fill_factor() != 0
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Pixels> for Length {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue