Skip to content

Wobbling slider effect for very small steps #3648

Closed
@alexballas

Description

Checklist

  • I have searched the issue tracker for open issues that relate to the same problem, before opening a new one.
  • This issue only relates to a single bug. I will open new issues for any other problems.

Describe the bug

Please refer to the attached video and code. Slider does a wobbling effect when using small incrementals with step 0. The issue is still visible with a bit higher steps like 0.1 and 0.2 (for the provided example)

2023-02-10_01-09-11.mp4

How to reproduce

Run code example

Screenshots

No response

Example code

package main

import (
	"time"

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

func main() {

	myApp := app.New()
	myWindow := myApp.NewWindow("Test Dialog")
	s := widget.NewSlider(0, 100)
	s.Step = 0
	myWindow.SetContent(s)
	myWindow.Resize(fyne.NewSize(myWindow.Canvas().Size().Width*10, myWindow.Canvas().Size().Height))
	go func() {
		t := time.NewTicker(time.Second)

		var v float64
		for range t.C {
			v += 0.1
			s.SetValue(v)
		}
	}()

	myWindow.ShowAndRun()
}

Fyne version

v2.3.0

Go compiler version

1.19.4

Operating system

Linux

Operating system version

Ubuntu 18.04

Additional Information

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions