barmodule: own hoverpanel internally, modules supply content as component

This commit is contained in:
Damocles 2026-04-25 14:07:26 +02:00
parent 26476dc930
commit 6fd36c812f
17 changed files with 367 additions and 453 deletions

View file

@ -8,27 +8,19 @@ M.BarModule {
id: root
spacing: S.Theme.moduleSpacing
visible: S.Modules.weather.enable && S.WeatherService.available
tooltip: S.WeatherService.summary || "Weather"
tooltip: "Weather"
panelNamespace: "nova-weather"
panelTitle: "Weather"
panelContentWidth: 280
panelComponent: Component {
C.WeatherApplet {
width: parent.width
accentColor: root.accentColor
}
}
M.BarIcon {
icon: S.WeatherService.icon
anchors.verticalCenter: parent.verticalCenter
}
M.HoverPanel {
id: hoverPanel
showPanel: root._showPanel
screen: QsWindow.window?.screen ?? null
anchorItem: root
accentColor: root.accentColor
panelNamespace: "nova-weather"
panelTitle: "Weather"
contentWidth: 280
onDismissed: root.dismissPanel()
C.WeatherApplet {
width: hoverPanel.contentWidth
accentColor: root.accentColor
}
}
}