forked from Shinonome/dots-hyprland
use PanelWindow instead to show animation
This commit is contained in:
@@ -95,23 +95,34 @@ MouseArea {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LazyLoader {
|
Loader {
|
||||||
id: popupLoader
|
id: popupLoader
|
||||||
active: root.containsMouse
|
active: root.containsMouse
|
||||||
|
|
||||||
component: PopupWindow {
|
sourceComponent: PanelWindow {
|
||||||
id: popupWindow
|
id: popupWindow
|
||||||
visible: true
|
visible: true
|
||||||
|
color: "transparent"
|
||||||
|
exclusiveZone: 0
|
||||||
|
|
||||||
|
anchors.top: true
|
||||||
|
anchors.left: true
|
||||||
|
|
||||||
implicitWidth: batteryPopup.implicitWidth
|
implicitWidth: batteryPopup.implicitWidth
|
||||||
implicitHeight: batteryPopup.implicitHeight
|
implicitHeight: batteryPopup.implicitHeight
|
||||||
anchor.item: root
|
|
||||||
anchor.rect.x: (root.implicitWidth - popupWindow.implicitWidth) / 2
|
margins {
|
||||||
anchor.rect.y: Config.options.bar.bottom
|
left: root.mapToGlobal(Qt.point(0, 0)).x - batteryPopup.implicitWidth / 3
|
||||||
? (-batteryPopup.implicitHeight - 15)
|
top: root.mapToGlobal(Qt.point(0, root.height)).y - 30
|
||||||
: (root.implicitHeight + 15)
|
}
|
||||||
color: "transparent"
|
|
||||||
|
mask: Region {
|
||||||
|
item: batteryPopup
|
||||||
|
}
|
||||||
|
|
||||||
BatteryPopup {
|
BatteryPopup {
|
||||||
id: batteryPopup
|
id: batteryPopup
|
||||||
|
anchors.centerIn: parent
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user