masonry example: Fix reference to `on_status_changed` (#719)

This is now just `update`.
This commit is contained in:
Bruce Mitchener 2024-10-29 23:40:35 +07:00 committed by GitHub
parent 0edce4f20f
commit 231e304249
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -145,7 +145,7 @@ impl Widget for CalcButton {
PointerEvent::PointerDown(_, _) => {
if !ctx.is_disabled() {
let color = self.active_color;
// See on_status_change for why we use `mutate_later` here.
// See `update` for why we use `mutate_later` here.
ctx.mutate_later(&mut self.inner, move |mut inner| {
SizedBox::set_background(&mut inner, color);
});
@ -156,7 +156,7 @@ impl Widget for CalcButton {
PointerEvent::PointerUp(_, _) => {
if ctx.has_pointer_capture() && !ctx.is_disabled() {
let color = self.base_color;
// See on_status_change for why we use `mutate_later` here.
// See `update` for why we use `mutate_later` here.
ctx.mutate_later(&mut self.inner, move |mut inner| {
SizedBox::set_background(&mut inner, color);
});