| commit | 8c4fac5bbd2c042c81ce9633637f60ba091f003e | [log] |
|---|---|---|
| author | Jan-Marek Glogowski <glogow@fbihome.de> | Sun Jun 28 00:48:01 2020 +0200 |
| committer | Adolfo Jayme Barrientos <fitojb@ubuntu.com> | Sun Jun 28 23:47:41 2020 +0200 |
| tree | 62f62089ba349deee0050735fe5b5039bd308ce9 | |
| parent | e9af6eec4a4e5c715c1792fdb6254cccc919e22e [diff] |
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 <glogow@fbihome.de> (cherry picked from commit efc333b9bff560de0fd353da28296d8e08f55cee) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97306 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
diff --git a/vcl/qt5/Qt5Widget.cxx b/vcl/qt5/Qt5Widget.cxx index 1c7a130..0ef305f 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());