[Libreoffice-commits] core.git: vcl/qt5
Jan-Marek Glogowski (via logerrit)
logerrit at kemper.freedesktop.org
Sun Jun 28 01:11:10 UTC 2020
vcl/qt5/Qt5Widget.cxx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit 9eda78fd53fe3c76eb9d4b63add68f266f551b10
Author: Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Sun Jun 28 00:48:01 2020 +0200
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Sun Jun 28 03:10:32 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 <glogow at fbihome.de>
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());
More information about the Libreoffice-commits
mailing list