rename a bit

This commit is contained in:
2025-08-28 22:21:43 -04:00
parent 97f2f67dee
commit 3df76d926c
10 changed files with 34 additions and 31 deletions

View File

@@ -4,7 +4,7 @@ use std::{any::Any, marker::PhantomData};
pub trait Widget: Any {
fn draw(&mut self, painter: &mut Painter);
fn size(&mut self, ctx: &mut SizeCtx) -> Vec2 {
fn get_size(&mut self, ctx: &mut SizeCtx) -> Vec2 {
ctx.size
}
}
@@ -18,7 +18,7 @@ pub struct SizeCtx<'a> {
impl SizeCtx<'_> {
pub fn size<W>(&mut self, id: &WidgetId<W>) -> Vec2 {
self.widgets.get_dyn_dynamic(&id.id).size(self)
self.widgets.get_dyn_dynamic(&id.id).get_size(self)
}
}