fix(tailscalectl): let PluginComponent handle left-click for popout
This commit is contained in:
parent
c3f63873ac
commit
821ede2bea
1 changed files with 22 additions and 34 deletions
|
|
@ -133,26 +133,20 @@ PluginComponent {
|
|||
}
|
||||
|
||||
horizontalBarPill: Component {
|
||||
MouseArea {
|
||||
implicitWidth: contentRow.implicitWidth
|
||||
implicitHeight: contentRow.implicitHeight
|
||||
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 {
|
||||
id: contentRow
|
||||
spacing: Theme.spacingS
|
||||
|
||||
MouseArea {
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
acceptedButtons: Qt.RightButton
|
||||
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
|
||||
|
|
@ -163,26 +157,20 @@ PluginComponent {
|
|||
}
|
||||
|
||||
verticalBarPill: Component {
|
||||
MouseArea {
|
||||
implicitWidth: contentColumn.implicitWidth
|
||||
implicitHeight: contentColumn.implicitHeight
|
||||
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 {
|
||||
id: contentColumn
|
||||
spacing: Theme.spacingXS
|
||||
|
||||
MouseArea {
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
acceptedButtons: Qt.RightButton
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue