1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-13 00:42:49 -05:00

TopBar VPN: fix centered icon by anchoring DankIcon center; remove inner wrapper

This commit is contained in:
Jon Rogers
2025-08-30 14:15:31 -04:00
parent 449418f537
commit 7cc2c0acef

View File

@@ -27,15 +27,12 @@ Rectangle {
return Qt.rgba(base.r, base.g, base.b, base.a * Theme.widgetTransparency) return Qt.rgba(base.r, base.g, base.b, base.a * Theme.widgetTransparency)
} }
Item {
anchors.centerIn: parent
DankIcon { DankIcon {
id: icon id: icon
name: VpnService.isBusy ? "sync" : (VpnService.connected ? "vpn_lock" : "vpn_key_off") name: VpnService.isBusy ? "sync" : (VpnService.connected ? "vpn_lock" : "vpn_key_off")
size: Theme.iconSize - 6 size: Theme.iconSize - 6
color: VpnService.connected ? Theme.primary : Theme.surfaceText color: VpnService.connected ? Theme.primary : Theme.surfaceText
anchors.verticalCenter: parent.verticalCenter anchors.centerIn: parent
RotationAnimation on rotation { RotationAnimation on rotation {
running: VpnService.isBusy running: VpnService.isBusy
@@ -45,7 +42,6 @@ Rectangle {
duration: 900 duration: 900
} }
} }
}
MouseArea { MouseArea {
id: clickArea id: clickArea