Introduce useful helpers in layout module
This commit is contained in:
parent
d24e50c1a6
commit
d62bb8193c
26 changed files with 189 additions and 127 deletions
|
|
@ -392,7 +392,6 @@ where
|
|||
{
|
||||
use std::f32;
|
||||
|
||||
let limits = limits.width(width).height(Length::Shrink);
|
||||
let font = font.unwrap_or_else(|| renderer.default_font());
|
||||
let text_size = text_size.unwrap_or_else(|| renderer.default_size());
|
||||
|
||||
|
|
@ -451,8 +450,10 @@ where
|
|||
);
|
||||
|
||||
limits
|
||||
.width(width)
|
||||
.height(Length::Shrink)
|
||||
.shrink(padding)
|
||||
.resolve(intrinsic, width, Length::Shrink)
|
||||
.resolve(width, Length::Shrink, intrinsic)
|
||||
.expand(padding)
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue