mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-05 09:25:38 +00:00
app: fixed swapped horizontal scrolling directions on Windows
Signed-off-by: pierre <pierre.curto@gmail.com>
This commit is contained in:
@@ -373,9 +373,11 @@ func (w *window) scrollEvent(wParam, lParam uintptr, horizontal bool) {
|
|||||||
windows.ScreenToClient(w.hwnd, &np)
|
windows.ScreenToClient(w.hwnd, &np)
|
||||||
p := f32.Point{X: float32(np.X), Y: float32(np.Y)}
|
p := f32.Point{X: float32(np.X), Y: float32(np.Y)}
|
||||||
dist := float32(int16(wParam >> 16))
|
dist := float32(int16(wParam >> 16))
|
||||||
sp := f32.Point{Y: -dist}
|
var sp f32.Point
|
||||||
if horizontal {
|
if horizontal {
|
||||||
sp.X, sp.Y = sp.Y, sp.X
|
sp.X = dist
|
||||||
|
} else {
|
||||||
|
sp.Y = -dist
|
||||||
}
|
}
|
||||||
w.w.Event(pointer.Event{
|
w.w.Event(pointer.Event{
|
||||||
Type: pointer.Scroll,
|
Type: pointer.Scroll,
|
||||||
|
|||||||
Reference in New Issue
Block a user