From acecbcc86a135975f2e1bce084e78611ab450dd7 Mon Sep 17 00:00:00 2001 From: Marco Allegretti Date: Sat, 18 Apr 2026 20:24:48 +0200 Subject: [PATCH] Fix notification popup position in convergence mode The input region Y was computed from the bottom of the screen instead of from the top, causing the touch region to be offset from the actual popup. Use openOffset directly since the popup anchors to the top. Unify the popup margin into a single property so the delegate x and the input-region regionX stay consistent. --- .../popups/notifications/NotificationPopupManager.qml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/components/mobileshell/qml/popups/notifications/NotificationPopupManager.qml b/components/mobileshell/qml/popups/notifications/NotificationPopupManager.qml index 75d0cd6c..f1c72dc5 100644 --- a/components/mobileshell/qml/popups/notifications/NotificationPopupManager.qml +++ b/components/mobileshell/qml/popups/notifications/NotificationPopupManager.qml @@ -33,6 +33,9 @@ Window { readonly property real openOffset: Kirigami.Units.gridUnit + Kirigami.Units.smallSpacing * 3 readonly property int longestLength: Math.max(Screen.width, Screen.height) readonly property bool isConvergence: ShellSettings.Settings.convergenceModeEnabled + // Margin between popup and screen edge in convergence mode; used in both + // the delegate x position and the input-region calculation so they stay in sync. + readonly property real convergencePopupMargin: Kirigami.Units.gridUnit * 2 property var keyboardInteractivity: LayerShell.Window.KeyboardInteractivityNone LayerShell.Window.scope: "notification" @@ -100,8 +103,8 @@ Window { } if (isConvergence) { - let regionX = notificationPopupManager.width - notificationPopupManager.popupWidth - Kirigami.Units.gridUnit * 4; - let regionY = Screen.height - openOffset - popupHeight - Kirigami.Units.gridUnit; + let regionX = notificationPopupManager.width - notificationPopupManager.popupWidth - notificationPopupManager.convergencePopupMargin; + let regionY = openOffset; ShellUtil.setInputRegion(notificationPopupManager, Qt.rect(regionX, regionY, notificationPopupManager.popupWidth + Kirigami.Units.gridUnit * 2, popupHeight + Kirigami.Units.gridUnit * 2)); } else { ShellUtil.setInputRegion(notificationPopupManager, Qt.rect((notificationPopupManager.width - notificationPopupManager.popupWidth - Kirigami.Units.gridUnit) / 2, openOffset - Kirigami.Units.gridUnit / 2, notificationPopupManager.popupWidth + Kirigami.Units.gridUnit, popupHeight + Kirigami.Units.gridUnit * ((notifications.count - notifications.currentPopupIndex > 1) ? 4 : 1))); @@ -203,7 +206,7 @@ Window { id: popup x: notificationPopupManager.isConvergence - ? (parent.width - width - Kirigami.Units.gridUnit * 2) + ? (parent.width - width - notificationPopupManager.convergencePopupMargin) : (parent.width - width) / 2 z: notifications.count - index