Resolve size using limits
This commit is contained in:
parent
8efebfcd07
commit
9e389b629b
2 changed files with 7 additions and 2 deletions
|
|
@ -105,6 +105,8 @@ where
|
|||
) -> layout::Node {
|
||||
let instant = Instant::now();
|
||||
|
||||
let limits = limits.width(Length::Shrink).height(Length::Shrink);
|
||||
|
||||
let shape = self.line.shape_opt().as_ref().unwrap();
|
||||
|
||||
//TODO: can we cache this?
|
||||
|
|
@ -128,7 +130,7 @@ where
|
|||
|
||||
log::debug!("layout {:?} in {:?}", size, instant.elapsed());
|
||||
|
||||
layout::Node::new(size)
|
||||
layout::Node::new(limits.resolve(size))
|
||||
}
|
||||
|
||||
fn draw(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue