nix/nixos/desktop/quickshell/Tooltip.qml
Markus Zoppelt 3e8edb46af feat: replace waybar, walker, and mako with quickshell
Tokyo Night bar, Raycast-style launcher, overlay notifications,
and click panels for media, volume, sysinfo, agents, bluetooth,
network, and the Secure Boot seal.
2026-08-16 15:45:22 +02:00

49 lines
1.1 KiB
QML

pragma Singleton
import QtQuick
import Quickshell
Singleton {
id: root
property string text: ""
property var at: null
function show(item, value) {
if (!item)
return;
at = item;
text = value;
}
function hide() {
text = "";
}
PopupWindow {
visible: root.text !== "" && root.at
color: "transparent"
implicitWidth: box.implicitWidth
implicitHeight: box.implicitHeight
anchor.item: root.at
anchor.edges: Edges.Bottom | Edges.Left
anchor.gravity: Edges.Bottom | Edges.Left
Rectangle {
id: box
implicitWidth: label.implicitWidth + 16
implicitHeight: label.implicitHeight + 12
color: Theme.bg
radius: Theme.radius
border.width: 1
border.color: Theme.black
Text {
id: label
anchors.centerIn: parent
text: root.text
color: Theme.fg
font.family: Theme.font
font.pixelSize: 13
}
}
}
}