Skip to content

Commit

Permalink
Respect max box constraints in taffy_layout
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoburns committed Nov 17, 2023
1 parent fef40f5 commit fbc74c0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/widget/taffy_layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,9 +344,10 @@ impl Widget for TaffyLayout {
}
cx.request_paint();

let max = bc.max();
Size {
width: output.size.width as f64,
height: output.size.height as f64,
width: (output.size.width as f64).min(max.width),
height: (output.size.height as f64).min(max.height),
}
// })
}
Expand Down

0 comments on commit fbc74c0

Please sign in to comment.