feat(bar): unify extraction to StyledPopup and add namespace

This commit is contained in:
Runze
2025-08-09 14:02:56 +08:00
parent 627c8562f7
commit 94176fad83
5 changed files with 158 additions and 200 deletions
@@ -36,37 +36,12 @@ MouseArea {
}
}
LazyLoader {
id: popupLoader
active: root.containsMouse
component: PanelWindow {
id: popupWindow
visible: true
implicitWidth: weatherPopup.implicitWidth
implicitHeight: weatherPopup.implicitHeight
color: "transparent"
exclusiveZone: 0
anchors.top: true
anchors.left: true
margins {
left: root.mapToGlobal(Qt.point(
(root.width - weatherPopup.implicitWidth) / 2,
0
)).x
top: root.mapToGlobal(Qt.point(0, root.height)).y - 25
}
mask: Region {
item: weatherPopup
}
WeatherPopup {
id: weatherPopup
}
StyledPopup {
hoverTarget: root
offsetY: -25
contentComponent: WeatherPopup {
id: weatherPopup
anchors.centerIn: parent
}
}
}