From 4cfae91f0287e3eda397ca8b88970f2b678e405d Mon Sep 17 00:00:00 2001 From: bbedward Date: Thu, 19 Feb 2026 09:15:26 -0500 Subject: [PATCH] dock: fix context menu styling fixes #1742 --- quickshell/Modules/Dock/DockContextMenu.qml | 86 ++++++++++++++------- 1 file changed, 60 insertions(+), 26 deletions(-) diff --git a/quickshell/Modules/Dock/DockContextMenu.qml b/quickshell/Modules/Dock/DockContextMenu.qml index 663c4f3d..fa2a1a36 100644 --- a/quickshell/Modules/Dock/DockContextMenu.qml +++ b/quickshell/Modules/Dock/DockContextMenu.qml @@ -165,7 +165,7 @@ PanelWindow { } width: Math.min(400, Math.max(180, menuColumn.implicitWidth + Theme.spacingS * 2)) - height: Math.max(60, menuColumn.implicitHeight + Theme.spacingS * 2) + height: menuColumn.implicitHeight + Theme.spacingS * 2 color: Theme.withAlpha(Theme.surfaceContainer, Theme.popupTransparency) radius: Theme.cornerRadius border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.08) @@ -388,18 +388,31 @@ PanelWindow { radius: Theme.cornerRadius color: pinArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : "transparent" - StyledText { + Row { anchors.left: parent.left anchors.leftMargin: Theme.spacingS anchors.right: parent.right anchors.rightMargin: Theme.spacingS anchors.verticalCenter: parent.verticalCenter - text: root.appData && root.appData.isPinned ? I18n.tr("Unpin from Dock") : I18n.tr("Pin to Dock") - font.pixelSize: Theme.fontSizeSmall - color: Theme.surfaceText - font.weight: Font.Normal - elide: Text.ElideRight - wrapMode: Text.NoWrap + spacing: Theme.spacingXS + + DankIcon { + anchors.verticalCenter: parent.verticalCenter + name: root.appData && root.appData.isPinned ? "keep_off" : "push_pin" + size: 14 + color: Theme.surfaceText + opacity: 0.7 + } + + StyledText { + anchors.verticalCenter: parent.verticalCenter + text: root.appData && root.appData.isPinned ? I18n.tr("Unpin from Dock") : I18n.tr("Pin to Dock") + font.pixelSize: Theme.fontSizeSmall + color: Theme.surfaceText + font.weight: Font.Normal + elide: Text.ElideRight + wrapMode: Text.NoWrap + } } DankRipple { @@ -448,18 +461,31 @@ PanelWindow { radius: Theme.cornerRadius color: nvidiaArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : "transparent" - StyledText { + Row { anchors.left: parent.left anchors.leftMargin: Theme.spacingS anchors.right: parent.right anchors.rightMargin: Theme.spacingS anchors.verticalCenter: parent.verticalCenter - text: I18n.tr("Launch on dGPU") - font.pixelSize: Theme.fontSizeSmall - color: Theme.surfaceText - font.weight: Font.Normal - elide: Text.ElideRight - wrapMode: Text.NoWrap + spacing: Theme.spacingXS + + DankIcon { + anchors.verticalCenter: parent.verticalCenter + name: "memory" + size: 14 + color: Theme.surfaceText + opacity: 0.7 + } + + StyledText { + anchors.verticalCenter: parent.verticalCenter + text: I18n.tr("Launch on dGPU") + font.pixelSize: Theme.fontSizeSmall + color: Theme.surfaceText + font.weight: Font.Normal + elide: Text.ElideRight + wrapMode: Text.NoWrap + } } DankRipple { @@ -490,23 +516,31 @@ PanelWindow { radius: Theme.cornerRadius color: closeArea.containsMouse ? Qt.rgba(Theme.error.r, Theme.error.g, Theme.error.b, 0.12) : "transparent" - StyledText { + Row { anchors.left: parent.left anchors.leftMargin: Theme.spacingS anchors.right: parent.right anchors.rightMargin: Theme.spacingS anchors.verticalCenter: parent.verticalCenter - text: { - if (root.appData && root.appData.type === "grouped") { - return "Close All Windows"; - } - return "Close Window"; + spacing: Theme.spacingXS + + DankIcon { + anchors.verticalCenter: parent.verticalCenter + name: "close" + size: 14 + color: closeArea.containsMouse ? Theme.error : Theme.surfaceText + opacity: 0.7 + } + + StyledText { + anchors.verticalCenter: parent.verticalCenter + text: root.appData && root.appData.type === "grouped" ? I18n.tr("Close All Windows") : I18n.tr("Close Window") + font.pixelSize: Theme.fontSizeSmall + color: closeArea.containsMouse ? Theme.error : Theme.surfaceText + font.weight: Font.Normal + elide: Text.ElideRight + wrapMode: Text.NoWrap } - font.pixelSize: Theme.fontSizeSmall - color: closeArea.containsMouse ? Theme.error : Theme.surfaceText - font.weight: Font.Normal - elide: Text.ElideRight - wrapMode: Text.NoWrap } DankRipple {