From 03fdf795e029af678b7401e2ba17b5d940b88f44 Mon Sep 17 00:00:00 2001 From: bbedward Date: Sun, 25 Jan 2026 14:21:03 -0500 Subject: [PATCH] launcher v2: general styling fixes - scrollbar - footer alignment - radii - hover colors --- quickshell/Modals/DankLauncherV2/GridItem.qml | 2 +- .../Modals/DankLauncherV2/LauncherContent.qml | 48 ++++++++++++------- .../Modals/DankLauncherV2/ResultItem.qml | 2 +- .../Modals/DankLauncherV2/ResultsList.qml | 9 ++++ .../Modals/DankLauncherV2/SectionHeader.qml | 2 +- quickshell/Modules/Settings/LauncherTab.qml | 2 +- quickshell/Widgets/DankFlickable.qml | 1 + quickshell/Widgets/DankScrollbar.qml | 7 ++- 8 files changed, 49 insertions(+), 24 deletions(-) diff --git a/quickshell/Modals/DankLauncherV2/GridItem.qml b/quickshell/Modals/DankLauncherV2/GridItem.qml index 27f9a91b..1da51d72 100644 --- a/quickshell/Modals/DankLauncherV2/GridItem.qml +++ b/quickshell/Modals/DankLauncherV2/GridItem.qml @@ -36,7 +36,7 @@ Rectangle { readonly property int computedIconSize: Math.min(48, Math.max(32, width * 0.45)) radius: Theme.cornerRadius - color: isSelected ? Theme.primaryPressed : isHovered ? Theme.primaryPressed : "transparent" + color: isSelected ? Theme.primaryPressed : isHovered ? Theme.primaryHoverLight : "transparent" Column { anchors.centerIn: parent diff --git a/quickshell/Modals/DankLauncherV2/LauncherContent.qml b/quickshell/Modals/DankLauncherV2/LauncherContent.qml index 59f4fe6c..2fd8d409 100644 --- a/quickshell/Modals/DankLauncherV2/LauncherContent.qml +++ b/quickshell/Modals/DankLauncherV2/LauncherContent.qml @@ -271,21 +271,32 @@ FocusScope { anchors.fill: parent visible: !editMode - Rectangle { + Item { id: footerBar anchors.left: parent.left anchors.right: parent.right anchors.bottom: parent.bottom + anchors.leftMargin: root.parentModal?.borderWidth ?? 1 + anchors.rightMargin: root.parentModal?.borderWidth ?? 1 + anchors.bottomMargin: root.parentModal?.borderWidth ?? 1 readonly property bool showFooter: SettingsData.dankLauncherV2Size !== "micro" && SettingsData.dankLauncherV2ShowFooter - height: showFooter ? 32 : 0 + height: showFooter ? 36 : 0 visible: showFooter - color: Theme.surfaceContainerHigh - radius: Theme.cornerRadius + clip: true + + Rectangle { + anchors.fill: parent + anchors.topMargin: -Theme.cornerRadius + color: Theme.surfaceContainerHigh + radius: Theme.cornerRadius + } Row { id: modeButtonsRow - x: I18n.isRtl ? parent.width - width - Theme.spacingS : Theme.spacingS - y: (parent.height - height) / 2 + anchors.left: parent.left + anchors.leftMargin: Theme.spacingXS + anchors.verticalCenter: parent.verticalCenter + layoutDirection: I18n.isRtl ? Qt.RightToLeft : Qt.LeftToRight spacing: 2 Repeater { @@ -316,28 +327,25 @@ FocusScope { required property var modelData required property int index - width: modeButtonMetrics.width + 14 + Theme.spacingXS + Theme.spacingM * 2 + Theme.spacingS - height: footerBar.height - 4 - radius: Theme.cornerRadius - 2 + width: buttonContent.width + Theme.spacingM * 2 + height: 28 + radius: Theme.cornerRadius color: controller.searchMode === modelData.id || modeArea.containsMouse ? Theme.primaryContainer : "transparent" - TextMetrics { - id: modeButtonMetrics - font.pixelSize: Theme.fontSizeSmall - text: modelData.label - } - Row { + id: buttonContent anchors.centerIn: parent spacing: Theme.spacingXS DankIcon { + anchors.verticalCenter: parent.verticalCenter name: modelData.icon size: 14 color: controller.searchMode === modelData.id ? Theme.primary : Theme.surfaceVariantText } StyledText { + anchors.verticalCenter: parent.verticalCenter text: modelData.label font.pixelSize: Theme.fontSizeSmall color: controller.searchMode === modelData.id ? Theme.primary : Theme.surfaceText @@ -357,23 +365,28 @@ FocusScope { Row { id: hintsRow - x: I18n.isRtl ? Theme.spacingS : parent.width - width - Theme.spacingS - y: (parent.height - height) / 2 + anchors.right: parent.right + anchors.rightMargin: Theme.spacingS + anchors.verticalCenter: parent.verticalCenter + layoutDirection: I18n.isRtl ? Qt.RightToLeft : Qt.LeftToRight spacing: Theme.spacingM StyledText { + anchors.verticalCenter: parent.verticalCenter text: "↑↓ " + I18n.tr("nav") font.pixelSize: Theme.fontSizeSmall - 1 color: Theme.surfaceVariantText } StyledText { + anchors.verticalCenter: parent.verticalCenter text: "↵ " + I18n.tr("open") font.pixelSize: Theme.fontSizeSmall - 1 color: Theme.surfaceVariantText } StyledText { + anchors.verticalCenter: parent.verticalCenter text: "Tab " + I18n.tr("actions") font.pixelSize: Theme.fontSizeSmall - 1 color: Theme.surfaceVariantText @@ -390,7 +403,6 @@ FocusScope { anchors.leftMargin: Theme.spacingM anchors.rightMargin: Theme.spacingM anchors.topMargin: Theme.spacingM - anchors.bottomMargin: Theme.spacingXS spacing: Theme.spacingXS clip: false diff --git a/quickshell/Modals/DankLauncherV2/ResultItem.qml b/quickshell/Modals/DankLauncherV2/ResultItem.qml index b6c2a37b..c8ebdb7f 100644 --- a/quickshell/Modals/DankLauncherV2/ResultItem.qml +++ b/quickshell/Modals/DankLauncherV2/ResultItem.qml @@ -35,7 +35,7 @@ Rectangle { width: parent?.width ?? 200 height: 52 - color: isSelected ? Theme.primaryPressed : isHovered ? Theme.primaryPressed : "transparent" + color: isSelected ? Theme.primaryPressed : isHovered ? Theme.primaryHoverLight : "transparent" radius: Theme.cornerRadius MouseArea { diff --git a/quickshell/Modals/DankLauncherV2/ResultsList.qml b/quickshell/Modals/DankLauncherV2/ResultsList.qml index 637ff6f3..9b1777fb 100644 --- a/quickshell/Modals/DankLauncherV2/ResultsList.qml +++ b/quickshell/Modals/DankLauncherV2/ResultsList.qml @@ -159,6 +159,15 @@ Item { contentHeight: sectionsColumn.height clip: true + Component.onCompleted: { + verticalScrollBar.targetFlickable = mainFlickable; + verticalScrollBar.parent = root; + verticalScrollBar.z = 102; + verticalScrollBar.anchors.right = root.right; + verticalScrollBar.anchors.top = root.top; + verticalScrollBar.anchors.bottom = root.bottom; + } + Column { id: sectionsColumn width: parent.width diff --git a/quickshell/Modals/DankLauncherV2/SectionHeader.qml b/quickshell/Modals/DankLauncherV2/SectionHeader.qml index 08e03180..a09af876 100644 --- a/quickshell/Modals/DankLauncherV2/SectionHeader.qml +++ b/quickshell/Modals/DankLauncherV2/SectionHeader.qml @@ -19,7 +19,7 @@ Rectangle { width: parent?.width ?? 200 height: 32 color: isSticky ? "transparent" : (hoverArea.containsMouse ? Theme.surfaceHover : "transparent") - radius: Theme.cornerRadius / 2 + radius: Theme.cornerRadius MouseArea { id: hoverArea diff --git a/quickshell/Modules/Settings/LauncherTab.qml b/quickshell/Modules/Settings/LauncherTab.qml index 0e03fa41..59ff0290 100644 --- a/quickshell/Modules/Settings/LauncherTab.qml +++ b/quickshell/Modules/Settings/LauncherTab.qml @@ -722,7 +722,7 @@ Item { anchors.centerIn: parent text: "DMS" font.pixelSize: Theme.fontSizeSmall - 2 - color: Theme.primaryText + color: Theme.primary } } } diff --git a/quickshell/Widgets/DankFlickable.qml b/quickshell/Widgets/DankFlickable.qml index 13c6c8cd..e85d7878 100644 --- a/quickshell/Widgets/DankFlickable.qml +++ b/quickshell/Widgets/DankFlickable.qml @@ -5,6 +5,7 @@ import qs.Widgets Flickable { id: flickable + property alias verticalScrollBar: vbar property real mouseWheelSpeed: 60 property real momentumVelocity: 0 property bool isMomentumActive: false diff --git a/quickshell/Widgets/DankScrollbar.qml b/quickshell/Widgets/DankScrollbar.qml index 2a19e4e3..c5d2d70a 100644 --- a/quickshell/Widgets/DankScrollbar.qml +++ b/quickshell/Widgets/DankScrollbar.qml @@ -5,12 +5,15 @@ import qs.Common ScrollBar { id: scrollbar + property var targetFlickable: null + readonly property var _target: targetFlickable ?? parent + property bool _scrollBarActive: false property alias hideTimer: hideScrollBarTimer - property bool _isParentMoving: parent && (parent.moving || parent.flicking || parent.isMomentumActive) + property bool _isParentMoving: _target && (_target.moving || _target.flicking || _target.isMomentumActive) property bool _shouldShow: pressed || hovered || active || _isParentMoving || _scrollBarActive - policy: (parent && parent.contentHeight > parent.height) ? ScrollBar.AsNeeded : ScrollBar.AlwaysOff + policy: (_target && _target.contentHeight > _target.height) ? ScrollBar.AsNeeded : ScrollBar.AlwaysOff minimumSize: 0.08 implicitWidth: 10 interactive: true