mirror of
https://github.com/vsariola/sointu.git
synced 2025-07-18 21:14:31 -04:00
feat(gioui): flip the unit parameter slider scroll wheel behaviour
Closes #112.
This commit is contained in:
parent
17312bbe4e
commit
aa7a2e56fa
@ -235,7 +235,7 @@ func (p ParameterStyle) Layout(gtx C) D {
|
||||
for _, e := range gtx.Events(&p.w.floatWidget) {
|
||||
if ev, ok := e.(pointer.Event); ok && ev.Type == pointer.Scroll {
|
||||
delta := math.Min(math.Max(float64(ev.Scroll.Y), -1), 1)
|
||||
tracker.Int{IntData: p.w.Parameter}.Add(int(delta))
|
||||
tracker.Int{IntData: p.w.Parameter}.Add(-int(delta))
|
||||
}
|
||||
}
|
||||
gtx.Constraints.Min.X = gtx.Dp(unit.Dp(200))
|
||||
|
Reference in New Issue
Block a user