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>
This commit is contained in:
J-P Nurmi 2018-02-01 14:37:32 +01:00
parent 403343039d
commit 756ebcd93a

View File

@ -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);