applets: Fix panics moving only applet in 'Start' to 'Center'
This commit is contained in:
parent
e534f7b151
commit
f97833543b
1 changed files with 3 additions and 2 deletions
|
|
@ -936,7 +936,7 @@ where
|
||||||
}
|
}
|
||||||
|
|
||||||
fn diff(&mut self, tree: &mut Tree) {
|
fn diff(&mut self, tree: &mut Tree) {
|
||||||
self.inner.as_widget_mut().diff(&mut tree.children[0]);
|
tree.diff_children(&mut [&mut self.inner]);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn width(&self) -> Length {
|
fn width(&self) -> Length {
|
||||||
|
|
@ -1001,7 +1001,8 @@ where
|
||||||
event::Status::Ignored => event::Status::Ignored,
|
event::Status::Ignored => event::Status::Ignored,
|
||||||
};
|
};
|
||||||
|
|
||||||
let height = (layout.bounds().height - SPACING * (self.info.len() - 1) as f32)
|
let height = (layout.bounds().height
|
||||||
|
- SPACING * (self.info.len().saturating_sub(1)) as f32)
|
||||||
/ self.info.len() as f32;
|
/ self.info.len() as f32;
|
||||||
let state = tree.state.downcast_mut::<ReorderWidgetState>();
|
let state = tree.state.downcast_mut::<ReorderWidgetState>();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue