vcl/qt5/Qt5Widget.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 855f17c5f683ab1dacf411ac410f237700a8fbcf
Author:     Jan-Marek Glogowski <[email protected]>
AuthorDate: Sun Jun 28 00:48:01 2020 +0200
Commit:     Michael Weghorn <[email protected]>
CommitDate: Mon Jun 29 07:13:02 2020 +0200

    tdf#131991 Qt5 RTL mirror mouse wheel X position
    
    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 <[email protected]>
    (cherry picked from commit 9eda78fd53fe3c76eb9d4b63add68f266f551b10)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97354
    Reviewed-by: Michael Weghorn <[email protected]>

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());
 
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to