From 88b32c7b05d431e1af5d9a8e5978989cd2481c2b Mon Sep 17 00:00:00 2001 From: Drew Weymouth Date: Sat, 6 May 2023 10:20:58 -0700 Subject: [PATCH] Fix #156: allow scrolling the volume slider --- CHANGELOG.md | 5 +++++ ui/widgets/auxcontrols.go | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 35760e4..0d2a29c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/ui/widgets/auxcontrols.go b/ui/widgets/auxcontrols.go index 10b738e..ce4573d 100644 --- a/ui/widgets/auxcontrols.go +++ b/ui/widgets/auxcontrols.go @@ -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