quickshell: fix network widget parent refs, drop click handler

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
rope 2026-05-26 11:04:34 +01:00
parent 463cb4dd07
commit 5207fe32f3

View file

@ -639,6 +639,7 @@ in
// Network status
Item {
id: netWidget
Layout.preferredHeight: 30
Layout.preferredWidth: netRow.width
Layout.rightMargin: 10
@ -665,13 +666,13 @@ in
let state = fields[2];
let conn = fields[3];
if (state === "connected") {
parent.parent.netState = "connected";
parent.parent.netConn = conn;
parent.parent.netIcon = "\u{f0200}";
netWidget.netState = "connected";
netWidget.netConn = conn;
netWidget.netIcon = "\u{f0200}";
} else {
parent.parent.netState = "disconnected";
parent.parent.netConn = "";
parent.parent.netIcon = "\u{f0201}";
netWidget.netState = "disconnected";
netWidget.netConn = "";
netWidget.netIcon = "\u{f0201}";
}
}
}
@ -684,17 +685,12 @@ in
spacing: 6
Text {
text: parent.parent.netIcon
text: netWidget.netIcon
color: "#${c.base05}"
font.family: "FiraMono Nerd Font"
font.pixelSize: 14
}
}
MouseArea {
anchors.fill: parent
onClicked: Qt.openUrlExternally("nm-connection-editor")
}
}
// Tray icons inline