Fix visual bug in masonry_calc example (#526)

This commit is contained in:
Olivier FAURE 2024-08-19 17:13:26 +02:00 committed by GitHub
parent 522d42cf0c
commit 42a6a320da
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 0 deletions

View File

@ -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();
}
_ => (),
}