mistakes were fixed and sins were committed

This commit is contained in:
2025-11-20 00:18:30 -05:00
parent db248de8f4
commit a952b34a72
18 changed files with 418 additions and 142 deletions

View File

@@ -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
}
}