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:
parent
403343039d
commit
756ebcd93a
@ -448,7 +448,8 @@ void QGtk3Menu::showPopup(const QWindow *parentWindow, const QRect &targetRect,
|
|||||||
if (index != -1)
|
if (index != -1)
|
||||||
gtk_menu_set_active(GTK_MENU(m_menu), index);
|
gtk_menu_set_active(GTK_MENU(m_menu), index);
|
||||||
|
|
||||||
m_targetPos = targetRect.bottomLeft();
|
m_targetPos = QPoint(targetRect.x(), targetRect.y() + targetRect.height());
|
||||||
|
|
||||||
if (parentWindow)
|
if (parentWindow)
|
||||||
m_targetPos = parentWindow->mapToGlobal(m_targetPos);
|
m_targetPos = parentWindow->mapToGlobal(m_targetPos);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user