mistakes were fixed and sins were committed
This commit is contained in:
@@ -24,10 +24,17 @@ impl Widget for Stack {
|
||||
}
|
||||
}
|
||||
|
||||
fn desired_size(&mut self, ctx: &mut SizeCtx) -> Size {
|
||||
fn desired_width(&mut self, ctx: &mut SizeCtx) -> Len {
|
||||
match self.size {
|
||||
StackSize::Default => Size::default(),
|
||||
StackSize::Child(i) => ctx.size(&self.children[i]),
|
||||
StackSize::Default => Len::default(),
|
||||
StackSize::Child(i) => ctx.width(&self.children[i]),
|
||||
}
|
||||
}
|
||||
|
||||
fn desired_height(&mut self, ctx: &mut SizeCtx) -> Len {
|
||||
match self.size {
|
||||
StackSize::Default => Len::default(),
|
||||
StackSize::Child(i) => ctx.height(&self.children[i]),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user