From 9866682dabe29a8805e5fa26c7c634047d366247 Mon Sep 17 00:00:00 2001 From: Artyom Sinyugin Date: Thu, 19 Dec 2024 14:14:32 +0300 Subject: [PATCH] xilem: rebuild method for button fixed --- xilem/src/view/button.rs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/xilem/src/view/button.rs b/xilem/src/view/button.rs index e99716b55..a8f87532a 100644 --- a/xilem/src/view/button.rs +++ b/xilem/src/view/button.rs @@ -66,12 +66,19 @@ where fn rebuild( &self, prev: &Self, - _state: &mut Self::ViewState, - _ctx: &mut ViewCtx, + state: &mut Self::ViewState, + ctx: &mut ViewCtx, mut element: Mut, ) { if prev.label != self.label { - widget::Button::set_text(&mut element, self.label.label.clone()); + let child = widget::Button::label_mut(&mut element); +