diff --git a/xilem/src/view/button.rs b/xilem/src/view/button.rs index a8f87532a..efc96bd33 100644 --- a/xilem/src/view/button.rs +++ b/xilem/src/view/button.rs @@ -53,6 +53,7 @@ where fn build(&self, ctx: &mut ViewCtx) -> (Self::Element, Self::ViewState) { ctx.with_leaf_action_widget(|ctx| { ctx.new_pod(widget::Button::from_label( + // TODO: Use `Label::build` here - currently impossible because `Pod` uses `WidgetPod` internally widget::Label::new(self.label.label.clone()) .with_brush(self.label.text_brush.clone()) .with_alignment(self.label.alignment) @@ -70,16 +71,13 @@ where ctx: &mut ViewCtx, mut element: Mut, ) { - if prev.label != self.label { - let child = widget::Button::label_mut(&mut element); -