Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extended progress bar does not update correctly #1219

Closed
Jacalz opened this issue Jul 26, 2020 · 2 comments
Closed

Extended progress bar does not update correctly #1219

Jacalz opened this issue Jul 26, 2020 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@Jacalz
Copy link
Member

Jacalz commented Jul 26, 2020

Describe the bug:

It seems like extending progress bars causes issues with refresh not working correctly among with some other issues that I have been seeing when using an extended progress bar in wormhole-gui.

The example code seems to only refresh the widget when the window is resized, however in wormhole-gui it doesn't seem to want to do that either. Switching theme updates it there and I have seen some issue with it looking blurry and broken but I can't reproduce that right now.

To Reproduce:

Steps to reproduce the behaviour:

  1. Run the example code.
  2. Notice how the widget gets refreshed only on window resize.

Screenshots:

progress

Example code:

package main

import (
	"time"

	"fyne.io/fyne/app"
	"fyne.io/fyne/widget"
)

type extProgress struct {
	widget.ProgressBar
}

func main() {
	a := app.New()
	w := a.NewWindow("Extended progress")

	p := &extProgress{}
	p.ExtendBaseWidget(p)

	p.Max = 10
	p.Min = 0

	go func() {
		for p.Value < p.Max {
			time.Sleep(time.Second)
			p.SetValue(p.Value + 1)
		}
	}()

	w.SetContent(p)
	w.ShowAndRun()
}

Device (please complete the following information):

  • OS: Linux
  • Version: 5.6.18
  • Go version: 1.14.6
  • Fyne version: 1.3.2
@Jacalz Jacalz added the bug Something isn't working label Jul 26, 2020
@Jacalz Jacalz added this to the 1.3.x milestone Jul 26, 2020
andydotxyz added a commit to andydotxyz/fyne that referenced this issue Jul 26, 2020
@andydotxyz
Copy link
Member

Fixed on develop - we forgot to call super() in Refresh calls in progressBar code

@andydotxyz
Copy link
Member

Just patched it onto the release branch as well :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants