mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 13:32:50 -05:00
widgets: fix running apps positioning and popup manager
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user