Remove max_width and max_height calls in scrollable::layout
This commit is contained in:
parent
046f3596ca
commit
66939b22b0
1 changed files with 1 additions and 9 deletions
|
|
@ -405,15 +405,7 @@ pub fn layout<Renderer>(
|
||||||
horizontal_enabled: bool,
|
horizontal_enabled: bool,
|
||||||
layout_content: impl FnOnce(&Renderer, &layout::Limits) -> layout::Node,
|
layout_content: impl FnOnce(&Renderer, &layout::Limits) -> layout::Node,
|
||||||
) -> layout::Node {
|
) -> layout::Node {
|
||||||
let limits = limits
|
let limits = limits.width(width).height(height);
|
||||||
.max_height(f32::INFINITY)
|
|
||||||
.max_width(if horizontal_enabled {
|
|
||||||
f32::INFINITY
|
|
||||||
} else {
|
|
||||||
limits.max().width
|
|
||||||
})
|
|
||||||
.width(width)
|
|
||||||
.height(height);
|
|
||||||
|
|
||||||
let child_limits = layout::Limits::new(
|
let child_limits = layout::Limits::new(
|
||||||
Size::new(limits.min().width, 0.0),
|
Size::new(limits.min().width, 0.0),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue