use PanelWindow instead to show animation

This commit is contained in:
Runze
2025-08-06 01:31:02 +08:00
parent 3a6c032782
commit 4161467356
@@ -95,23 +95,34 @@ MouseArea {
}
}
LazyLoader {
Loader {
id: popupLoader
active: root.containsMouse
component: PopupWindow {
sourceComponent: PanelWindow {
id: popupWindow
visible: true
color: "transparent"
exclusiveZone: 0
anchors.top: true
anchors.left: true
implicitWidth: batteryPopup.implicitWidth
implicitHeight: batteryPopup.implicitHeight
anchor.item: root
anchor.rect.x: (root.implicitWidth - popupWindow.implicitWidth) / 2
anchor.rect.y: Config.options.bar.bottom
? (-batteryPopup.implicitHeight - 15)
: (root.implicitHeight + 15)
color: "transparent"
margins {
left: root.mapToGlobal(Qt.point(0, 0)).x - batteryPopup.implicitWidth / 3
top: root.mapToGlobal(Qt.point(0, root.height)).y - 30
}
mask: Region {
item: batteryPopup
}
BatteryPopup {
id: batteryPopup
anchors.centerIn: parent
}
}
}