summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/qt5/Qt5Widget.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/vcl/qt5/Qt5Widget.cxx b/vcl/qt5/Qt5Widget.cxx
index 1c7a130aabe4..0ef305f42949 100644
--- a/vcl/qt5/Qt5Widget.cxx
+++ b/vcl/qt5/Qt5Widget.cxx
@@ -192,7 +192,9 @@ void Qt5Widget::wheelEvent(QWheelEvent* pEvent)
const Point aPos = toPoint(pEvent->pos() * m_rFrame.devicePixelRatioF());
SalWheelMouseEvent aEvent;
- aEvent.mnX = aPos.X();
+ aEvent.mnX = QGuiApplication::isLeftToRight()
+ ? aPos.X()
+ : round(width() * m_rFrame.devicePixelRatioF()) - aPos.X();
aEvent.mnY = aPos.Y();
aEvent.mnTime = pEvent->timestamp();
aEvent.mnCode = GetKeyModCode(pEvent->modifiers()) | GetMouseModCode(pEvent->buttons());