widget/toplevel_item: Fix tree passed to layout() of second child
This commit is contained in:
parent
588e889e0b
commit
4637fcb655
1 changed files with 4 additions and 3 deletions
|
|
@ -83,9 +83,10 @@ impl<Msg> Widget<Msg, cosmic::Theme, cosmic::Renderer> for ToplevelItem<'_, Msg>
|
||||||
// Get layout of main widget, to set overall cross axis size
|
// Get layout of main widget, to set overall cross axis size
|
||||||
let (max_width, max_height) = self.axis.pack(max_main, max_cross);
|
let (max_width, max_height) = self.axis.pack(max_main, max_cross);
|
||||||
let child_limits = layout::Limits::new(Size::ZERO, Size::new(max_width, max_height));
|
let child_limits = layout::Limits::new(Size::ZERO, Size::new(max_width, max_height));
|
||||||
let layout = self.children[1]
|
let layout =
|
||||||
.as_widget()
|
self.children[1]
|
||||||
.layout(tree, renderer, &child_limits);
|
.as_widget()
|
||||||
|
.layout(&mut tree.children[1], renderer, &child_limits);
|
||||||
|
|
||||||
let max_cross = self.axis.cross(layout.size());
|
let max_cross = self.axis.cross(layout.size());
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue