iris: move text state into shared resources
This commit is contained in:
1 parent
7c23c5f146
commit
51719ed121
17 files changed
+631
-434
No files matched your search
@@ -8,8 +8,8 @@ pub(crate) fn update_info<Rsc: UiRsc>(rsc: &mut Rsc, info: WeakWidget<Text>, vie
|
||||
rsc.widgets().len(),
|
||||
render_state.get().active_widgets(),
|
||||
);
|
||||
if new != *rsc.widgets()[info].content {
|
||||
*rsc.widgets_mut()[info].content = new;
|
||||
if new != rsc.widgets()[info].content() {
|
||||
rsc.widgets_mut()[info].set_text(new);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ where
|
||||
.attr::<Selectable>(())
|
||||
.on(Submit, move |ctx, rsc: &mut Rsc| {
|
||||
let w = ctx.widget;
|
||||
let content = w.edit(rsc).take();
|
||||
let content = w(rsc).take();
|
||||
let text = wtext(content)
|
||||
.editable(EditMode::MultiLine)
|
||||
.size(30)
|
||||
|
||||
Reference in new issue
Block a user