mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-04 17:49:45 +02:00
Two-fingered horizontal swipe on mac touchpad scrolls the wave
This commit is contained in:
parent
74c8dcf8d3
commit
4f9810cd1f
@ -5513,6 +5513,14 @@ void TrackPanel::HandleResize(wxMouseEvent & event)
|
||||
/// Handle mouse wheel rotation (for zoom in/out, vertical and horizontal scrolling)
|
||||
void TrackPanel::HandleWheelRotation(wxMouseEvent & event)
|
||||
{
|
||||
if(event.GetWheelAxis() == wxMOUSE_WHEEL_HORIZONTAL) {
|
||||
// Two-fingered horizontal swipe on mac is treated like shift-mousewheel
|
||||
event.SetShiftDown(true);
|
||||
// This makes the wave move in the same direction as the fingers, and the scrollbar
|
||||
// thumb moves oppositely
|
||||
event.m_wheelRotation *= -1;
|
||||
}
|
||||
|
||||
if(!event.HasAnyModifiers()) {
|
||||
// We will later un-skip if we do anything, but if we don't,
|
||||
// propagate the event up for the sake of the scrubber
|
||||
|
Loading…
x
Reference in New Issue
Block a user