convenience methods for span

This commit is contained in:
iris committed 2025-12-20 01:38:56 -05:00
1 parent c00ded78c0
commit 1ccf947220
2 files changed
+11 -3

No files matched your search

+3 -3
View File
@@ -64,7 +64,7 @@ impl DefaultAppState for Client {
let child = image(include_bytes!("assets/sungals.png"))
.center()
.add_strong(ctx);
span_add(ctx).children.push(child);
span_add(ctx).push(child);
})
.sized((150, 150))
.align(Align::BOT_RIGHT);
@@ -72,7 +72,7 @@ impl DefaultAppState for Client {
let del_button = rect(Color::RED)
.radius(30)
.on(CursorSense::click(), move |ctx| {
span_add(ctx).children.pop();
span_add(ctx).pop();
})
.sized((150, 150))
.align(Align::BOT_LEFT);
@@ -121,7 +121,7 @@ impl DefaultAppState for Client {
let msg_box = text
.background(rect(Color::WHITE.darker(0.5)))
.add_strong(ctx);
texts(ctx).children.push(msg_box);
texts(ctx).push(msg_box);
})
.add(&mut rsc);
let text_edit_scroll = (