This repository has been archived on 2026-07-13. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
nova-shell/modules/BarLabel.qml
2026-04-12 10:50:00 +02:00

26 lines
676 B
QML

import QtQuick
import "." as M
Text {
id: root
property string label: ""
property string tooltip: ""
text: label
color: M.Theme.base05
font.pixelSize: M.Theme.fontSize
font.family: M.Theme.fontFamily
verticalAlignment: Text.AlignVCenter
HoverHandler {
onHoveredChanged: {
if (hovered && root.tooltip !== "") {
M.FlyoutState.text = root.tooltip
M.FlyoutState.itemX = root.mapToGlobal(root.width / 2, 0).x
M.FlyoutState.visible = true
} else if (!hovered && root.tooltip !== "") {
M.FlyoutState.visible = false
}
}
}
}