This commit is contained in:
2026-01-12 18:40:27 -05:00
parent a9c76e4326
commit 79813db3ba
35 changed files with 378 additions and 403 deletions

View File

@@ -12,7 +12,7 @@ fn main() {
#[derive(DefaultUiState)]
pub struct Client {
ui_state: DefaultUiState,
info: WidgetRef<Text>,
info: WeakWidget<Text>,
}
impl DefaultAppState for Client {
@@ -147,7 +147,7 @@ impl DefaultAppState for Client {
let main = WidgetPtr::new().add(rsc);
let vals = Rc::new(RefCell::new((0, Vec::new())));
let mut switch_button = |color, to: WidgetRef, label| {
let mut switch_button = |color, to: WeakWidget, label| {
let to = to.upgrade(rsc);
let vec = &mut vals.borrow_mut().1;
let i = vec.len();

View File

@@ -14,7 +14,7 @@ type Rsc = DefaultRsc<State>;
#[derive(Clone, Copy, WidgetView)]
struct Test {
#[root]
root: WidgetRef<Rect>,
root: WeakWidget<Rect>,
}
impl Test {