add tooltips
This commit is contained in:
parent
7ca7e1e952
commit
6370732e4e
15 changed files with 123 additions and 1 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import Quickshell.Io
|
||||
import "." as M
|
||||
|
||||
|
|
@ -62,4 +63,15 @@ Row {
|
|||
font.family: M.Theme.fontFamily
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
HoverHandler { id: hover }
|
||||
ToolTip {
|
||||
visible: hover.hovered
|
||||
text: {
|
||||
if (root.state === "wifi") return "WiFi: " + root.essid + (root.ifname ? "\nInterface: " + root.ifname : "");
|
||||
if (root.state === "eth") return "Ethernet: " + root.ifname;
|
||||
if (root.state === "linked") return "Linked: " + root.ifname;
|
||||
return "Disconnected";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue