Skip to content

Commit

Permalink
Fix flickering on the Progress tab in demo app
Browse files Browse the repository at this point in the history
  • Loading branch information
lusingander authored and andydotxyz committed Nov 1, 2020
1 parent 56fdd27 commit 0e0cc63
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/fyne_demo/tutorials/widget.go
Expand Up @@ -239,6 +239,8 @@ func makeInputTab(_ fyne.Window) fyne.CanvasObject {
}

func makeProgressTab(_ fyne.Window) fyne.CanvasObject {
stopProgress()

progress = widget.NewProgressBar()

fprogress = widget.NewProgressBar()
Expand Down Expand Up @@ -311,11 +313,12 @@ func startProgress() {
}

go func() {
end := endProgress
num := 0.0
for num < 1.0 {
time.Sleep(100 * time.Millisecond)
select {
case <-endProgress:
case <-end:
return
default:
}
Expand Down

0 comments on commit 0e0cc63

Please sign in to comment.