Fix Shift scrolling for scrollable on macOS
Apparently, macOS inverts the scrolling axes automatically now. Was this a thing before, or did an update just break user space?
This commit is contained in:
parent
eb49567791
commit
6d4155a548
1 changed files with 3 additions and 1 deletions
|
|
@ -564,7 +564,9 @@ where
|
||||||
let delta = match delta {
|
let delta = match delta {
|
||||||
mouse::ScrollDelta::Lines { x, y } => {
|
mouse::ScrollDelta::Lines { x, y } => {
|
||||||
// TODO: Configurable speed/friction (?)
|
// TODO: Configurable speed/friction (?)
|
||||||
let movement = if state.keyboard_modifiers.shift() {
|
let movement = if !cfg!(target_os = "macos") // macOS automatically inverts the axes when Shift is pressed
|
||||||
|
&& state.keyboard_modifiers.shift()
|
||||||
|
{
|
||||||
Vector::new(y, x)
|
Vector::new(y, x)
|
||||||
} else {
|
} else {
|
||||||
Vector::new(x, y)
|
Vector::new(x, y)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue