summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2020-06-28 00:48:01 +0200
committerMichael Meeks <michael.meeks@collabora.com>2020-07-03 18:17:12 +0200
commit41a99caa45705c11e4c792a5ee678c3c2338290d (patch)
tree47eaf46a6934e03826d345beb6c50d8aa6dc38de
parent7f27f0559bc1101441dcebd9af6d4ac9a0b0f11e (diff)
tdf#131991 Qt5 RTL mirror mouse wheel X positiondistro/collabora/cp-6.4
Just like all the other events, the mouse wheels X position must be mirrord in LO RTL mode. Change-Id: I28e8da0455d941f42f869b08edcdbe570de366c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97338 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit 9eda78fd53fe3c76eb9d4b63add68f266f551b10) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97354 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97875 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
-rw-r--r--vcl/qt5/Qt5Widget.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/qt5/Qt5Widget.cxx b/vcl/qt5/Qt5Widget.cxx
index 12e9a54f7f4f..ca4bef0ffbfe 100644
--- a/vcl/qt5/Qt5Widget.cxx
+++ b/vcl/qt5/Qt5Widget.cxx
@@ -181,7 +181,7 @@ void Qt5Widget::wheelEvent(QWheelEvent* pEvent)
SalWheelMouseEvent aEvent;
aEvent.mnTime = pEvent->timestamp();
- aEvent.mnX = pEvent->pos().x();
+ aEvent.mnX = QGuiApplication::isLeftToRight() ? pEvent->pos().x() : width() - pEvent->pos().x();
aEvent.mnY = pEvent->pos().y();
aEvent.mnCode = GetKeyModCode(pEvent->modifiers()) | GetMouseModCode(pEvent->buttons());