Skip to content

Commit

Permalink
Races fixed up enough to close out the fyne_demo reports
Browse files Browse the repository at this point in the history
This is not using the final API but I wanted to progress tasks as while working on trickier details.
I will move this to public API when it is decided, a simple refactor will cover it.

In the meantime I can no longer get any reports from  in fyne_demo
  • Loading branch information
andydotxyz committed Jan 8, 2025
1 parent 8343d80 commit f2a9462
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions cmd/fyne_demo/tutorials/canvas.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@ func canvasScreen(_ fyne.Window) fyne.CanvasObject {
for {
time.Sleep(time.Second)

gradient.Angle += 45
if gradient.Angle >= 360 {
gradient.Angle -= 360
}
canvas.Refresh(gradient)
fyne.CurrentApp().Driver().CallFromGoroutine(func() {
gradient.Angle += 45
if gradient.Angle >= 360 {
gradient.Angle -= 360
}
canvas.Refresh(gradient)
})
}
}()

Expand Down

0 comments on commit f2a9462

Please sign in to comment.