Fix #156: allow scrolling the volume slider

This commit is contained in:
Drew Weymouth
2023-05-06 10:20:58 -07:00
parent e212484d00
commit 88b32c7b05
2 changed files with 9 additions and 0 deletions
+5
View File
@@ -2,6 +2,11 @@
## Unreleased
### Added
- [#156](https://github.com/dweymouth/supersonic/issues/156) Allow adjusting volume slider with the scroll wheel
## [0.2.0] - 2023-05-05
### Added
- [#145](https://github.com/dweymouth/supersonic/issues/145) Add rating column to tracklist with 5-star rating widget
- [#101](https://github.com/dweymouth/supersonic/issues/101) Add light theme, and optional auto-switching between dark and light
+4
View File
@@ -57,6 +57,10 @@ func (v *volumeSlider) MinSize() fyne.Size {
return fyne.NewSize(v.Width, h)
}
func (v *volumeSlider) Scrolled(e *fyne.ScrollEvent) {
v.SetValue(v.Value + float64(0.5*e.Scrolled.DY))
}
type VolumeControl struct {
widget.BaseWidget