Fixed menu positioning in cascade mode
This commit is contained in:
parent
507b115bf6
commit
46d30444eb
2 changed files with 3 additions and 3 deletions
|
@ -110,8 +110,6 @@ Loader {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
menu.model = model
|
|
||||||
|
|
||||||
if (x !== 0) {
|
if (x !== 0) {
|
||||||
menu.x = x
|
menu.x = x
|
||||||
}
|
}
|
||||||
|
@ -119,6 +117,8 @@ Loader {
|
||||||
if (y !== 0) {
|
if (y !== 0) {
|
||||||
menu.y = y
|
menu.y = y
|
||||||
}
|
}
|
||||||
|
|
||||||
|
menu.model = model
|
||||||
}
|
}
|
||||||
|
|
||||||
Timer {
|
Timer {
|
||||||
|
|
|
@ -675,7 +675,7 @@ void PopupView::updatePosition()
|
||||||
if (popupRect.right() > anchorRect.right() || parentCascadeAlign != Qt::AlignmentFlag::AlignRight) {
|
if (popupRect.right() > anchorRect.right() || parentCascadeAlign != Qt::AlignmentFlag::AlignRight) {
|
||||||
if (isCascade) {
|
if (isCascade) {
|
||||||
// move to the right of the parent
|
// 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);
|
setCascadeAlign(Qt::AlignmentFlag::AlignLeft);
|
||||||
} else {
|
} else {
|
||||||
// move to the left to an area that doesn't fit
|
// move to the left to an area that doesn't fit
|
||||||
|
|
Loading…
Reference in a new issue