diff --git a/.config/quickshell/modules/common/widgets/StyledToolTip.qml b/.config/quickshell/modules/common/widgets/StyledToolTip.qml index 13959fd8f..3a6c1a401 100644 --- a/.config/quickshell/modules/common/widgets/StyledToolTip.qml +++ b/.config/quickshell/modules/common/widgets/StyledToolTip.qml @@ -7,9 +7,31 @@ import QtQuick.Layouts ToolTip { property string content property bool extraVisibleCondition: true + property bool internalVisibleCondition: false padding: 7 - visible: (extraVisibleCondition && (parent.hovered === undefined || parent?.hovered)) + visible: (extraVisibleCondition && (parent.hovered === undefined || parent?.hovered) && internalVisibleCondition) + + Connections { + target: parent + onHoveredChanged: { + if (parent.hovered) { + tooltipShowDelay.restart() + } else { + internalVisibleCondition = false + } + } + } + + Timer { + id: tooltipShowDelay + interval: 200 + repeat: false + running: false + onTriggered: { + internalVisibleCondition = true + } + } background: Rectangle { color: Appearance.colors.colTooltip