From dff70f18d19b199bf82fcc2344cc69528f892bc2 Mon Sep 17 00:00:00 2001 From: Damocles Date: Sat, 18 Apr 2026 00:42:58 +0200 Subject: [PATCH] add app name tooltip on hover for lock screen notification pills --- shell/lock/LockSurface.qml | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/shell/lock/LockSurface.qml b/shell/lock/LockSurface.qml index 0e774b6..1f9d39c 100644 --- a/shell/lock/LockSurface.qml +++ b/shell/lock/LockSurface.qml @@ -167,6 +167,7 @@ WlSessionLockSurface { model: parent._notifGroups delegate: Rectangle { + id: _pill required property var modelData width: _pillRow.implicitWidth + 12 height: 24 @@ -175,6 +176,22 @@ WlSessionLockSurface { border.color: Qt.rgba(S.Theme.base03.r, S.Theme.base03.g, S.Theme.base03.b, 0.3) border.width: 1 + HoverHandler { + id: _pillHover + } + + // App name tooltip + Text { + anchors.horizontalCenter: parent.horizontalCenter + anchors.bottom: parent.top + anchors.bottomMargin: 4 + text: _pill.modelData.name || "" + color: S.Theme.base04 + font.pixelSize: S.Theme.fontSize - 2 + font.family: S.Theme.fontFamily + visible: _pillHover.hovered && text !== "" + } + Row { id: _pillRow anchors.centerIn: parent @@ -185,7 +202,7 @@ WlSessionLockSurface { width: 14 height: 14 source: { - const icon = modelData.icon; + const icon = _pill.modelData.icon; if (!icon) return ""; if (icon.startsWith("/")) @@ -198,11 +215,11 @@ WlSessionLockSurface { Text { anchors.verticalCenter: parent.verticalCenter - text: modelData.count > 1 ? modelData.count.toString() : "" + text: _pill.modelData.count > 1 ? _pill.modelData.count.toString() : "" color: S.Theme.base04 font.pixelSize: S.Theme.fontSize - 2 font.family: S.Theme.fontFamily - visible: modelData.count > 1 + visible: _pill.modelData.count > 1 } } }