Introduce useful helpers in layout module
This commit is contained in:
parent
d24e50c1a6
commit
d62bb8193c
26 changed files with 189 additions and 127 deletions
|
|
@ -508,8 +508,8 @@ where
|
|||
let padding = padding.fit(Size::ZERO, limits.max());
|
||||
let height = line_height.to_absolute(text_size);
|
||||
|
||||
let limits = limits.width(width).shrink(padding).height(height);
|
||||
let text_bounds = limits.resolve(Size::ZERO, width, height);
|
||||
let limits = limits.width(width).shrink(padding);
|
||||
let text_bounds = limits.resolve(width, height, Size::ZERO);
|
||||
|
||||
let placeholder_text = Text {
|
||||
font,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue