update iris & get button working again

This commit is contained in:
2026-01-19 21:26:59 -05:00
parent 040b70e1c5
commit e67c55d67d
8 changed files with 213 additions and 70 deletions

View File

@@ -4,7 +4,7 @@ use super::*;
pub const SIZE: u32 = 20;
pub fn main_view(rsc: &mut Rsc) -> WidgetRef {
pub fn main_view(rsc: &mut Rsc) -> WeakWidget {
let msg_panel = msg_panel(rsc);
let side_bar = rect(Color::BLACK.brighter(0.05)).width(80);
@@ -33,7 +33,7 @@ pub fn msg_widget(username: &str, content: &str) -> impl WidgetIdFn<Rsc> {
.to_any()
}
pub fn msg_panel(rsc: &mut Rsc) -> WidgetRef {
pub fn msg_panel(rsc: &mut Rsc) -> WeakWidget {
let msg_area = Span::empty(Dir::DOWN).gap(15);
let send_text = wtext("")
@@ -54,7 +54,7 @@ pub fn msg_panel(rsc: &mut Rsc) -> WidgetRef {
.on(Submit, move |ctx, rsc| {
let content = ctx.widget.edit(rsc).take();
let msg = msg_widget("ur mothe:", &content).add_strong(rsc);
rsc.ui[msg_area].children.push(msg);
rsc[msg_area].children.push(msg);
})
.pad(15)
.attr::<Selector>(send_text)