1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-31 08:52:49 -05:00

VPN Popout: show only one header action (Quick Connect when none active, Disconnect All when any active)

This commit is contained in:
Jon Rogers
2025-08-30 16:32:09 -04:00
parent d1890c69c9
commit 1e7a0beaed

View File

@@ -162,12 +162,12 @@ DankPopout {
Item { Layout.fillWidth: true; height: 1 } Item { Layout.fillWidth: true; height: 1 }
// Quick connect // Quick connect (shown only when none active)
Rectangle { Rectangle {
height: 28 height: 28
radius: 14 radius: 14
color: quickBtnArea.containsMouse ? Theme.primaryHoverLight : Theme.surfaceLight color: quickBtnArea.containsMouse ? Theme.primaryHoverLight : Theme.surfaceLight
visible: VpnService.profiles.length > 0 visible: !VpnService.connected && VpnService.profiles.length > 0
width: 120 width: 120
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
border.width: 1 border.width: 1
@@ -189,7 +189,7 @@ DankPopout {
} }
} }
// Disconnect all (visible when any active) // Disconnect all (shown only when any active)
Rectangle { Rectangle {
height: 28 height: 28
radius: 14 radius: 14
@@ -204,7 +204,7 @@ DankPopout {
anchors.centerIn: parent anchors.centerIn: parent
spacing: Theme.spacingXS spacing: Theme.spacingXS
DankIcon { name: "link_off"; size: Theme.fontSizeSmall; color: Theme.surfaceText } DankIcon { name: "link_off"; size: Theme.fontSizeSmall; color: Theme.surfaceText }
StyledText { text: "Disconnect All"; font.pixelSize: Theme.fontSizeSmall; color: Theme.surfaceText; font.weight: Font.Medium } StyledText { text: "Disconnect"; font.pixelSize: Theme.fontSizeSmall; color: Theme.surfaceText; font.weight: Font.Medium }
} }
MouseArea { MouseArea {