mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-28 15:32:50 -05:00
feat: Dock Overflow/Updated Settings Options
This commit is contained in:
@@ -29,6 +29,15 @@ Item {
|
||||
property bool showTooltip: mouseArea.containsMouse && !dragging
|
||||
property var cachedDesktopEntry: null
|
||||
property real actualIconSize: 40
|
||||
property bool shouldShowIndicator: {
|
||||
if (!appData)
|
||||
return false;
|
||||
if (appData.type === "window")
|
||||
return true;
|
||||
if (appData.type === "grouped")
|
||||
return appData.windowCount > 0;
|
||||
return appData.isRunning;
|
||||
}
|
||||
readonly property string coreIconColorOverride: SettingsData.dockLauncherLogoColorOverride
|
||||
readonly property bool coreIconHasCustomColor: coreIconColorOverride !== "" && coreIconColorOverride !== "primary" && coreIconColorOverride !== "surface"
|
||||
readonly property color effectiveCoreIconColor: {
|
||||
@@ -206,7 +215,7 @@ Item {
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
enabled: true
|
||||
preventStealing: true
|
||||
preventStealing: dragging || longPressing
|
||||
cursorShape: longPressing ? Qt.DragMoveCursor : Qt.PointingHandCursor
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.MiddleButton
|
||||
onPressed: mouse => {
|
||||
@@ -295,7 +304,7 @@ Item {
|
||||
groupedToplevel.activate();
|
||||
} else if (contextMenu) {
|
||||
const shouldHidePin = appData.appId === "org.quickshell";
|
||||
contextMenu.showForButton(root, appData, root.height + 25, shouldHidePin, cachedDesktopEntry, parentDockScreen);
|
||||
contextMenu.showForButton(root, appData, root.height + 25, shouldHidePin, cachedDesktopEntry, parentDockScreen, dockApps);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -342,7 +351,7 @@ Item {
|
||||
case "grouped":
|
||||
if (contextMenu) {
|
||||
const shouldHidePin = appData.appId === "org.quickshell";
|
||||
contextMenu.showForButton(root, appData, root.height, shouldHidePin, cachedDesktopEntry, parentDockScreen);
|
||||
contextMenu.showForButton(root, appData, root.height, shouldHidePin, cachedDesktopEntry, parentDockScreen, dockApps);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@@ -365,7 +374,7 @@ Item {
|
||||
if (!contextMenu)
|
||||
return;
|
||||
const shouldHidePin = appData.appId === "org.quickshell";
|
||||
contextMenu.showForButton(root, appData, root.height, shouldHidePin, cachedDesktopEntry, parentDockScreen);
|
||||
contextMenu.showForButton(root, appData, root.height, shouldHidePin, cachedDesktopEntry, parentDockScreen, dockApps);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -498,15 +507,7 @@ Item {
|
||||
|
||||
sourceComponent: SettingsData.dockPosition === SettingsData.Position.Left || SettingsData.dockPosition === SettingsData.Position.Right ? columnIndicator : rowIndicator
|
||||
|
||||
visible: {
|
||||
if (!appData)
|
||||
return false;
|
||||
if (appData.type === "window")
|
||||
return true;
|
||||
if (appData.type === "grouped")
|
||||
return appData.windowCount > 0;
|
||||
return appData.isRunning;
|
||||
}
|
||||
visible: root.shouldShowIndicator
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user