summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2018-02-01 14:37:32 +0100
committerJ-P Nurmi <jpnurmi@qt.io>2018-02-05 18:21:13 +0000
commit756ebcd93a028bd9c731acddbea09de67c2410e3 (patch)
treef3ce34a48a2b92b66929deb5695222bdc3981a13
parent403343039d07812c0beee9260b291f86e14d8ac4 (diff)
QGtk3Menu::showPopup(): fix off by one error in the y-coordinate
QRect::bottom() != QRect::y() + QRect::height() Change-Id: I83ae19ab588fb9651354999679f5d3c9e294a97e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
-rw-r--r--src/plugins/platformthemes/gtk3/qgtk3menu.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/platformthemes/gtk3/qgtk3menu.cpp b/src/plugins/platformthemes/gtk3/qgtk3menu.cpp
index f48e00ab8e..99407a21de 100644
--- a/src/plugins/platformthemes/gtk3/qgtk3menu.cpp
+++ b/src/plugins/platformthemes/gtk3/qgtk3menu.cpp
@@ -448,7 +448,8 @@ void QGtk3Menu::showPopup(const QWindow *parentWindow, const QRect &targetRect,
if (index != -1)
gtk_menu_set_active(GTK_MENU(m_menu), index);
- m_targetPos = targetRect.bottomLeft();
+ m_targetPos = QPoint(targetRect.x(), targetRect.y() + targetRect.height());
+
if (parentWindow)
m_targetPos = parentWindow->mapToGlobal(m_targetPos);