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,21 +132,18 @@ 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 {
cursorShape: Qt.PointingHandCursor
acceptedButtons: Qt.RightButton
anchors.verticalCenter: parent.verticalCenter
width: hIcon.implicitWidth
height: hIcon.implicitHeight
onClicked: toggleTailscale()
DankIcon { DankIcon {
id: hIcon
name: root.isConnected ? "vpn_key" : "vpn_key_off" name: root.isConnected ? "vpn_key" : "vpn_key_off"
size: Theme.iconSize size: Theme.iconSize
color: root.isConnected ? Theme.primary : Theme.surfaceText color: root.isConnected ? Theme.primary : Theme.surfaceText
@ -154,23 +151,12 @@ PluginComponent {
} }
} }
} }
}
verticalBarPill: Component { verticalBarPill: Component {
Column { Column {
id: contentColumn
spacing: Theme.spacingXS spacing: Theme.spacingXS
MouseArea {
cursorShape: Qt.PointingHandCursor
acceptedButtons: Qt.RightButton
anchors.horizontalCenter: parent.horizontalCenter
width: vIcon.implicitWidth
height: vIcon.implicitHeight
onClicked: toggleTailscale()
DankIcon { DankIcon {
id: vIcon
name: root.isConnected ? "vpn_key" : "vpn_key_off" name: root.isConnected ? "vpn_key" : "vpn_key_off"
size: Theme.iconSize size: Theme.iconSize
color: root.isConnected ? Theme.primary : Theme.surfaceText color: root.isConnected ? Theme.primary : Theme.surfaceText
@ -179,4 +165,3 @@ PluginComponent {
} }
} }
} }
}