summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget_mac.mm
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qwidget_mac.mm')
-rw-r--r--src/gui/kernel/qwidget_mac.mm11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index 53d1b6e..cdf0706 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -1064,7 +1064,7 @@ OSStatus QWidgetPrivate::qt_window_event(EventHandlerCallRef er, EventRef event,
break;
}
qNGEvent.gestureType = QNativeGestureEvent::Rotate;
- qNGEvent.percentage = float(amount);
+ qNGEvent.percentage = float(-amount);
break; }
case kEventGestureSwipe: {
HIPoint swipeDirection;
@@ -1074,7 +1074,14 @@ OSStatus QWidgetPrivate::qt_window_event(EventHandlerCallRef er, EventRef event,
break;
}
qNGEvent.gestureType = QNativeGestureEvent::Swipe;
- qNGEvent.direction = QSize(-swipeDirection.x, -swipeDirection.y);
+ if (swipeDirection.x == 1)
+ qNGEvent.angle = 180.0f;
+ else if (swipeDirection.x == -1)
+ qNGEvent.angle = 0.0f;
+ else if (swipeDirection.y == 1)
+ qNGEvent.angle = 90.0f;
+ else if (swipeDirection.y == -1)
+ qNGEvent.angle = 270.0f;
break; }
case kEventGestureMagnify: {
CGFloat amount;