don't always do the "dialog inside panel"
if a window is not outsideParentWindow or all the borders are enabled, don't do the trick this fixes positioning of systray tooltips
This commit is contained in:
parent
1dc6d98aa3
commit
0f4654643f
@ -340,18 +340,19 @@ QPoint DialogProxy::popupPosition(QQuickItem *item, const QSize &size, Qt::Align
|
||||
//not actually the current window. See QWindow::screen() documentation
|
||||
QRect avail = screenForItem(item)->availableGeometry();
|
||||
|
||||
|
||||
//make the panel look it's inside the panel, in order to not make it look cutted
|
||||
switch (m_location) {
|
||||
case Plasma::Types::LeftEdge:
|
||||
case Plasma::Types::RightEdge:
|
||||
avail.setTop(qMax(avail.top(), parentGeometryBounds.top()));
|
||||
avail.setBottom(qMin(avail.bottom(), parentGeometryBounds.bottom()));
|
||||
break;
|
||||
default:
|
||||
avail.setLeft(qMax(avail.left(), parentGeometryBounds.left()));
|
||||
avail.setRight(qMin(avail.right(), parentGeometryBounds.right()));
|
||||
break;
|
||||
if (outsideParentWindow && m_frameSvgItem->enabledBorders() != Plasma::FrameSvg::AllBorders) {
|
||||
//make the panel look it's inside the panel, in order to not make it look cutted
|
||||
switch (m_location) {
|
||||
case Plasma::Types::LeftEdge:
|
||||
case Plasma::Types::RightEdge:
|
||||
avail.setTop(qMax(avail.top(), parentGeometryBounds.top()));
|
||||
avail.setBottom(qMin(avail.bottom(), parentGeometryBounds.bottom()));
|
||||
break;
|
||||
default:
|
||||
avail.setLeft(qMax(avail.left(), parentGeometryBounds.left()));
|
||||
avail.setRight(qMin(avail.right(), parentGeometryBounds.right()));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (dialogPos.x() < avail.left()) {
|
||||
|
Loading…
Reference in New Issue
Block a user