Fixed menu positioning in cascade mode

This commit is contained in:
Eism 2022-05-04 11:39:01 +03:00
parent 507b115bf6
commit 46d30444eb
2 changed files with 3 additions and 3 deletions

View file

@ -110,8 +110,6 @@ Loader {
return
}
menu.model = model
if (x !== 0) {
menu.x = x
}
@ -119,6 +117,8 @@ Loader {
if (y !== 0) {
menu.y = y
}
menu.model = model
}
Timer {

View file

@ -675,7 +675,7 @@ void PopupView::updatePosition()
if (popupRect.right() > anchorRect.right() || parentCascadeAlign != Qt::AlignmentFlag::AlignRight) {
if (isCascade) {
// move to the right of the parent
movePos(parentTopLeft.x() - popupRect.width() + padding() * 2, m_globalPos.y());
movePos(parentTopLeft.x() - popupRect.width(), m_globalPos.y());
setCascadeAlign(Qt::AlignmentFlag::AlignLeft);
} else {
// move to the left to an area that doesn't fit