fix(tailscalectl): let PluginComponent handle left-click for popout

This commit is contained in:
Vybe (Coding Agent) 2026-05-17 21:18:02 +00:00
parent c3f63873ac
commit 821ede2bea

View file

@ -133,26 +133,20 @@ PluginComponent {
} }
horizontalBarPill: Component { horizontalBarPill: Component {
MouseArea { Row {
implicitWidth: contentRow.implicitWidth id: contentRow
implicitHeight: contentRow.implicitHeight spacing: Theme.spacingS
cursorShape: Qt.PointingHandCursor
acceptedButtons: Qt.RightButton | Qt.LeftButton
propagateComposedEvents: true
onClicked: (mouse) => {
if (mouse.button === Qt.RightButton) {
toggleTailscale()
mouse.accepted = true
} else {
mouse.accepted = false
}
}
Row { MouseArea {
id: contentRow cursorShape: Qt.PointingHandCursor
spacing: Theme.spacingS 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
@ -163,26 +157,20 @@ PluginComponent {
} }
verticalBarPill: Component { verticalBarPill: Component {
MouseArea { Column {
implicitWidth: contentColumn.implicitWidth id: contentColumn
implicitHeight: contentColumn.implicitHeight spacing: Theme.spacingXS
cursorShape: Qt.PointingHandCursor
acceptedButtons: Qt.RightButton | Qt.LeftButton
propagateComposedEvents: true
onClicked: (mouse) => {
if (mouse.button === Qt.RightButton) {
toggleTailscale()
mouse.accepted = true
} else {
mouse.accepted = false
}
}
Column { MouseArea {
id: contentColumn cursorShape: Qt.PointingHandCursor
spacing: Theme.spacingXS 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