[Notifications] Don't dodge notification popups

This wasn't an issue before as notification popups could never have focus.
However, now with quick reply they can, leading to funky results and gaps when a notification appears while answering another one.

Differential Revision: https://phabricator.kde.org/D27134
wilder-5.18
Kai Uwe Broulik 6 years ago
parent 1c0c8ddef4
commit 70f9652271
  1. 4
      applets/notifications/package/contents/ui/global/Globals.qml

@ -279,7 +279,7 @@ QtObject {
if (popupLocation & Qt.AlignTop) {
// We want to calculate the new position based on its original target position to avoid positioning it and then
// positioning it again, hence the temporary Qt.rect with explicit "y" and not just the popup as a whole
if (focusDialog && focusDialog.visible && focusDialog !== popup
if (focusDialog && focusDialog.visible && !(focusDialog instanceof NotificationPopup)
&& rectIntersect(focusDialog, Qt.rect(popup.x, y, popup.width, popup.height))) {
y = focusDialog.y + focusDialog.height + popupEdgeDistance;
}
@ -289,7 +289,7 @@ QtObject {
y += popup.height + (popup.height > 0 ? popupSpacing : 0);
} else {
y -= popup.height;
if (focusDialog && focusDialog.visible && focusDialog !== popup
if (focusDialog && focusDialog.visible && !(focusDialog instanceof NotificationPopup)
&& rectIntersect(focusDialog, Qt.rect(popup.x, y, popup.width, popup.height))) {
y = focusDialog.y - popup.height - popupEdgeDistance;
}

Loading…
Cancel
Save