fix(tailscalectl): remove MouseArea from pills, add root-level right-click handler

This commit is contained in:
Vybe (Coding Agent) 2026-05-17 21:23:01 +00:00
parent 821ede2bea
commit 0743f5450e

View file

@ -132,50 +132,35 @@ PluginComponent {
} }
} }
MouseArea {
anchors.fill: parent
acceptedButtons: Qt.RightButton
propagateComposedEvents: true
onClicked: toggleTailscale()
}
horizontalBarPill: Component { horizontalBarPill: Component {
Row { Row {
id: contentRow
spacing: Theme.spacingS spacing: Theme.spacingS
MouseArea { DankIcon {
cursorShape: Qt.PointingHandCursor name: root.isConnected ? "vpn_key" : "vpn_key_off"
acceptedButtons: Qt.RightButton size: Theme.iconSize
color: root.isConnected ? Theme.primary : Theme.surfaceText
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
width: hIcon.implicitWidth
height: hIcon.implicitHeight
onClicked: toggleTailscale()
DankIcon {
id: hIcon
name: root.isConnected ? "vpn_key" : "vpn_key_off"
size: Theme.iconSize
color: root.isConnected ? Theme.primary : Theme.surfaceText
anchors.verticalCenter: parent.verticalCenter
}
} }
} }
} }
verticalBarPill: Component { verticalBarPill: Component {
Column { Column {
id: contentColumn
spacing: Theme.spacingXS spacing: Theme.spacingXS
MouseArea { DankIcon {
cursorShape: Qt.PointingHandCursor name: root.isConnected ? "vpn_key" : "vpn_key_off"
acceptedButtons: Qt.RightButton size: Theme.iconSize
color: root.isConnected ? Theme.primary : Theme.surfaceText
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
width: vIcon.implicitWidth
height: vIcon.implicitHeight
onClicked: toggleTailscale()
DankIcon {
id: vIcon
name: root.isConnected ? "vpn_key" : "vpn_key_off"
size: Theme.iconSize
color: root.isConnected ? Theme.primary : Theme.surfaceText
anchors.horizontalCenter: parent.horizontalCenter
}
} }
} }
} }