From df41ae4acb147f362e0bfa7576331e1ac6b375e3 Mon Sep 17 00:00:00 2001 From: bbedward Date: Tue, 16 Jun 2026 18:26:29 -0400 Subject: [PATCH] running apps: fix blurred tooltips --- .../Modules/DankBar/Widgets/RunningApps.qml | 34 +++++++++++-------- quickshell/Widgets/DankTooltip.qml | 15 ++++++-- 2 files changed, 33 insertions(+), 16 deletions(-) diff --git a/quickshell/Modules/DankBar/Widgets/RunningApps.qml b/quickshell/Modules/DankBar/Widgets/RunningApps.qml index 8a0360ef..8c67d6b8 100644 --- a/quickshell/Modules/DankBar/Widgets/RunningApps.qml +++ b/quickshell/Modules/DankBar/Widgets/RunningApps.qml @@ -18,6 +18,14 @@ BasePill { property var widgetData: null property var hoveredItem: null + + onHoveredItemChanged: { + if (hoveredItem) + return; + if (tooltipLoader.item) + tooltipLoader.item.hide(); + tooltipLoader.active = false; + } property var topBar: null property bool isAutoHideBar: false property Item windowRoot: (Window.window ? Window.window.contentItem : null) @@ -236,6 +244,11 @@ BasePill { delegate: Item { id: delegateItem + Component.onDestruction: { + if (root.hoveredItem === delegateItem) + root.hoveredItem = null; + } + property bool isGrouped: root._groupByApp property var groupData: isGrouped ? modelData : null property var toplevelData: isGrouped ? (modelData.windows.length > 0 ? modelData.windows[0].toplevel : null) : modelData @@ -461,14 +474,8 @@ BasePill { } } onExited: { - if (root.hoveredItem === delegateItem) { + if (root.hoveredItem === delegateItem) root.hoveredItem = null; - if (tooltipLoader.item) { - tooltipLoader.item.hide(); - } - - tooltipLoader.active = false; - } } } } @@ -491,6 +498,11 @@ BasePill { delegate: Item { id: delegateItem + Component.onDestruction: { + if (root.hoveredItem === delegateItem) + root.hoveredItem = null; + } + property bool isGrouped: root._groupByApp property var groupData: isGrouped ? modelData : null property var toplevelData: isGrouped ? (modelData.windows.length > 0 ? modelData.windows[0].toplevel : null) : modelData @@ -715,14 +727,8 @@ BasePill { } } onExited: { - if (root.hoveredItem === delegateItem) { + if (root.hoveredItem === delegateItem) root.hoveredItem = null; - if (tooltipLoader.item) { - tooltipLoader.item.hide(); - } - - tooltipLoader.active = false; - } } } } diff --git a/quickshell/Widgets/DankTooltip.qml b/quickshell/Widgets/DankTooltip.qml index caf04059..8cd1fd21 100644 --- a/quickshell/Widgets/DankTooltip.qml +++ b/quickshell/Widgets/DankTooltip.qml @@ -2,6 +2,8 @@ import QtQuick import Quickshell import Quickshell.Wayland import qs.Common +import qs.Services +import qs.Widgets PanelWindow { id: root @@ -69,12 +71,21 @@ PanelWindow { } } + WindowBlur { + targetWindow: root + blurX: 0 + blurY: 0 + blurWidth: root.visible ? root.width : 0 + blurHeight: root.visible ? root.height : 0 + blurRadius: Theme.cornerRadius + } + Rectangle { anchors.fill: parent color: Theme.withAlpha(Theme.surfaceContainerHigh, Theme.popupTransparency) radius: Theme.cornerRadius - border.width: 1 - border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.08) + border.width: BlurService.enabled ? BlurService.borderWidth : 1 + border.color: BlurService.enabled ? BlurService.borderColor : Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.08) StyledText { id: textContent