Fix subtract overflow
This commit is contained in:
parent
2b3773c88e
commit
d50c1f13f6
1 changed files with 1 additions and 1 deletions
|
|
@ -74,7 +74,7 @@ impl<'a, Msg> Widget<Msg, cosmic::Renderer> for Toplevels<'a, Msg> {
|
|||
let spacing = 16;
|
||||
|
||||
// Get total requested main axis length if widget could have all the space
|
||||
let total_spacing = spacing * (self.children.len() - 1).max(0);
|
||||
let total_spacing = spacing * (self.children.len().saturating_sub(1)).max(0);
|
||||
let requested_mains = self
|
||||
.children
|
||||
.iter()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue