diff --git a/tailscalectl/TailscaleWidget.qml b/tailscalectl/TailscaleWidget.qml index 24aac11..d182db4 100644 --- a/tailscalectl/TailscaleWidget.qml +++ b/tailscalectl/TailscaleWidget.qml @@ -132,50 +132,35 @@ PluginComponent { } } + MouseArea { + anchors.fill: parent + acceptedButtons: Qt.RightButton + propagateComposedEvents: true + onClicked: toggleTailscale() + } + horizontalBarPill: Component { Row { - id: contentRow spacing: Theme.spacingS - MouseArea { - cursorShape: Qt.PointingHandCursor - acceptedButtons: Qt.RightButton + DankIcon { + name: root.isConnected ? "vpn_key" : "vpn_key_off" + size: Theme.iconSize + color: root.isConnected ? Theme.primary : Theme.surfaceText 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 { Column { - id: contentColumn spacing: Theme.spacingXS - MouseArea { - cursorShape: Qt.PointingHandCursor - acceptedButtons: Qt.RightButton + DankIcon { + name: root.isConnected ? "vpn_key" : "vpn_key_off" + size: Theme.iconSize + color: root.isConnected ? Theme.primary : Theme.surfaceText 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 - } } } }