mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-11 07:52:50 -05:00
TopBar VPN: fix centered icon by anchoring DankIcon center; remove inner wrapper
This commit is contained in:
@@ -27,23 +27,19 @@ 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 {
|
DankIcon {
|
||||||
|
id: icon
|
||||||
|
name: VpnService.isBusy ? "sync" : (VpnService.connected ? "vpn_lock" : "vpn_key_off")
|
||||||
|
size: Theme.iconSize - 6
|
||||||
|
color: VpnService.connected ? Theme.primary : Theme.surfaceText
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
|
|
||||||
DankIcon {
|
RotationAnimation on rotation {
|
||||||
id: icon
|
running: VpnService.isBusy
|
||||||
name: VpnService.isBusy ? "sync" : (VpnService.connected ? "vpn_lock" : "vpn_key_off")
|
loops: Animation.Infinite
|
||||||
size: Theme.iconSize - 6
|
from: 0
|
||||||
color: VpnService.connected ? Theme.primary : Theme.surfaceText
|
to: 360
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
duration: 900
|
||||||
|
|
||||||
RotationAnimation on rotation {
|
|
||||||
running: VpnService.isBusy
|
|
||||||
loops: Animation.Infinite
|
|
||||||
from: 0
|
|
||||||
to: 360
|
|
||||||
duration: 900
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user