From 42a6a320da165907da4d33c3fb8eee7c40f218b3 Mon Sep 17 00:00:00 2001 From: Olivier FAURE Date: Mon, 19 Aug 2024 17:13:26 +0200 Subject: [PATCH] Fix visual bug in masonry_calc example (#526) --- masonry/examples/calc_masonry.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/masonry/examples/calc_masonry.rs b/masonry/examples/calc_masonry.rs index 0578e6a4..8df1edc2 100644 --- a/masonry/examples/calc_masonry.rs +++ b/masonry/examples/calc_masonry.rs @@ -196,11 +196,17 @@ impl Widget for CalcButton { ctx.mutate_later(&mut self.inner, move |mut inner| { inner.set_border(Color::WHITE, 3.0); }); + // FIXME - This is a monkey-patch for a problem where the mutate pass isn't run after this. + // Should be fixed once the pass spec RFC is implemented. + ctx.request_anim_frame(); } StatusChange::HotChanged(false) => { ctx.mutate_later(&mut self.inner, move |mut inner| { inner.set_border(Color::TRANSPARENT, 3.0); }); + // FIXME - This is a monkey-patch for a problem where the mutate pass isn't run after this. + // Should be fixed once the pass spec RFC is implemented. + ctx.request_anim_frame(); } _ => (), }