WIP - Next: implement Element derive macro
This commit is contained in:
parent
6d2b27689d
commit
dfeb702544
21 changed files with 980 additions and 119 deletions
|
@ -100,8 +100,8 @@ impl From<Size<Option<Pixels>>> for Size<Option<f32>> {
|
|||
impl Size<Length> {
|
||||
pub fn full() -> Self {
|
||||
Self {
|
||||
width: relative(1.),
|
||||
height: relative(1.),
|
||||
width: relative(1.).into(),
|
||||
height: relative(1.).into(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -410,7 +410,7 @@ impl Debug for Length {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn relative<T: From<DefiniteLength>>(fraction: f32) -> T {
|
||||
pub fn relative(fraction: f32) -> DefiniteLength {
|
||||
DefiniteLength::Fraction(fraction).into()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue