mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-27 06:07:59 +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)
|
/// Handle mouse wheel rotation (for zoom in/out, vertical and horizontal scrolling)
|
||||||
void TrackPanel::HandleWheelRotation(wxMouseEvent & event)
|
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()) {
|
if(!event.HasAnyModifiers()) {
|
||||||
// We will later un-skip if we do anything, but if we don't,
|
// We will later un-skip if we do anything, but if we don't,
|
||||||
// propagate the event up for the sake of the scrubber
|
// propagate the event up for the sake of the scrubber
|
||||||
|
Loading…
x
Reference in New Issue
Block a user