mistakes were fixed and sins were committed
This commit is contained in:
@@ -51,8 +51,17 @@ impl Widget for TextEdit {
|
||||
}
|
||||
}
|
||||
|
||||
fn desired_size(&mut self, ctx: &mut SizeCtx) -> Size {
|
||||
Size::abs(self.view.draw(ctx).size())
|
||||
fn desired_width(&mut self, ctx: &mut SizeCtx) -> Len {
|
||||
Len::abs(self.view.draw(ctx).size().x)
|
||||
}
|
||||
|
||||
fn desired_height(&mut self, ctx: &mut SizeCtx) -> Len {
|
||||
let res = Len::abs(self.view.draw(ctx).size().y);
|
||||
if (res.abs - 639.0).abs() < 0.5 && ctx.label(ctx.id()) == "WHAT" {
|
||||
let source = ctx.label(ctx.source());
|
||||
println!("{source} => {:?}: [{}] -> {}", ctx.id(), ctx.outer, res.abs);
|
||||
}
|
||||
res
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user