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:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user