mistakes were fixed and sins were committed
This commit is contained in:
@@ -12,11 +12,19 @@ impl Widget for WidgetPtr {
|
||||
}
|
||||
}
|
||||
|
||||
fn desired_size(&mut self, ctx: &mut SizeCtx) -> Size {
|
||||
fn desired_width(&mut self, ctx: &mut SizeCtx) -> Len {
|
||||
if let Some(id) = &self.inner {
|
||||
ctx.size(id)
|
||||
ctx.width(id)
|
||||
} else {
|
||||
Size::ZERO
|
||||
Len::ZERO
|
||||
}
|
||||
}
|
||||
|
||||
fn desired_height(&mut self, ctx: &mut SizeCtx) -> Len {
|
||||
if let Some(id) = &self.inner {
|
||||
ctx.height(id)
|
||||
} else {
|
||||
Len::ZERO
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user