1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-27 15:02:50 -05:00

feat: Dock overflow & New setting options

This commit is contained in:
purian23
2026-01-26 15:25:45 -05:00
parent 2263338878
commit 14a3a0ae55
9 changed files with 864 additions and 313 deletions

View File

@@ -19,8 +19,9 @@ PanelWindow {
property bool hidePin: false
property var desktopEntry: null
property bool isDmsWindow: appData?.appId === "org.quickshell"
property var dockApps: null
function showForButton(button, data, dockHeight, hidePinOption, entry, dockScreen) {
function showForButton(button, data, dockHeight, hidePinOption, entry, dockScreen, parentDockApps) {
if (dockScreen) {
root.screen = dockScreen
}
@@ -30,6 +31,7 @@ PanelWindow {
dockVisibleHeight = dockHeight || 40
hidePin = hidePinOption || false
desktopEntry = entry || null
dockApps = parentDockApps || null
visible = true
}
@@ -397,6 +399,16 @@ PanelWindow {
SessionData.removePinnedApp(root.appData.appId)
} else {
SessionData.addPinnedApp(root.appData.appId)
// Auto-expand overflow if pinning would exceed limit
if (root.dockApps) {
Qt.callLater(() => {
const newPinnedCount = SessionData.pinnedApps.length;
if (newPinnedCount > root.dockApps.maxVisibleApps && root.dockApps.overflowItemCount > 0) {
root.dockApps.overflowExpanded = true;
}
});
}
}
root.close()
}