From 61d311b157572b72daa8d616efbb10273546e9ae Mon Sep 17 00:00:00 2001 From: bbedward Date: Tue, 13 Jan 2026 08:26:29 -0500 Subject: [PATCH] widgets: fix running apps positioning and popup manager --- quickshell/Modules/DankBar/Widgets/RunningApps.qml | 12 ++++++++---- .../Notifications/Popup/NotificationPopupManager.qml | 5 +++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/quickshell/Modules/DankBar/Widgets/RunningApps.qml b/quickshell/Modules/DankBar/Widgets/RunningApps.qml index 926f2c5d..8201e130 100644 --- a/quickshell/Modules/DankBar/Widgets/RunningApps.qml +++ b/quickshell/Modules/DankBar/Widgets/RunningApps.qml @@ -493,8 +493,10 @@ Item { const globalPos = delegateItem.mapToGlobal(delegateItem.width / 2, 0); const screenX = root.parentScreen ? root.parentScreen.x : 0; const relativeX = globalPos.x - screenX; - const yPos = root.barThickness + root.barSpacing - 7; - windowContextMenuLoader.item.showAt(relativeX, yPos, false, "top"); + const screenHeight = root.parentScreen ? root.parentScreen.height : Screen.height; + const isBottom = root.axis?.edge === "bottom"; + const yPos = isBottom ? (screenHeight - root.barThickness - root.barSpacing - 32 - Theme.spacingXS) : (root.barThickness + root.barSpacing + Theme.spacingXS); + windowContextMenuLoader.item.showAt(relativeX, yPos, false, root.axis?.edge); } } } else if (mouse.button === Qt.MiddleButton) { @@ -726,8 +728,10 @@ Item { const globalPos = delegateItem.mapToGlobal(delegateItem.width / 2, 0); const screenX = root.parentScreen ? root.parentScreen.x : 0; const relativeX = globalPos.x - screenX; - const yPos = root.barThickness + root.barSpacing - 7; - windowContextMenuLoader.item.showAt(relativeX, yPos, false, "top"); + const screenHeight = root.parentScreen ? root.parentScreen.height : Screen.height; + const isBottom = root.axis?.edge === "bottom"; + const yPos = isBottom ? (screenHeight - root.barThickness - root.barSpacing - 32 - Theme.spacingXS) : (root.barThickness + root.barSpacing + Theme.spacingXS); + windowContextMenuLoader.item.showAt(relativeX, yPos, false, root.axis?.edge); } } } diff --git a/quickshell/Modules/Notifications/Popup/NotificationPopupManager.qml b/quickshell/Modules/Notifications/Popup/NotificationPopupManager.qml index 05cecf44..b2966dd6 100644 --- a/quickshell/Modules/Notifications/Popup/NotificationPopupManager.qml +++ b/quickshell/Modules/Notifications/Popup/NotificationPopupManager.qml @@ -10,8 +10,9 @@ QtObject { readonly property bool compactMode: SettingsData.notificationCompactMode readonly property real cardPadding: compactMode ? Theme.spacingS : Theme.spacingM readonly property real popupIconSize: compactMode ? 48 : 63 - readonly property real popupSpacing: Theme.spacingS - readonly property int baseNotificationHeight: cardPadding * 3 + popupIconSize + popupSpacing + readonly property real actionButtonHeight: compactMode ? 20 : 24 + readonly property real popupSpacing: 4 + readonly property int baseNotificationHeight: cardPadding * 2 + popupIconSize + actionButtonHeight + Theme.spacingS + popupSpacing property int maxTargetNotifications: 4 property var popupWindows: [] // strong refs to windows (live until exitFinished) property var destroyingWindows: new Set()