refactor: unified BarModule base component, click-to-open panels, remove pinning

This commit is contained in:
Damocles 2026-04-25 11:52:20 +02:00
parent 034f0b6d85
commit 26476dc930
33 changed files with 273 additions and 517 deletions

View file

@ -4,18 +4,15 @@ import "." as M
import "../services" as S
import "../applets" as C
M.PinnableSection {
M.BarModule {
id: root
spacing: S.Theme.moduleSpacing
visible: S.Modules.weather.enable && S.WeatherService.available
_panelHovered: hoverPanel.panelHovered
tooltip: S.WeatherService.summary || "Weather"
M.BarIcon {
icon: S.WeatherService.icon
anchors.verticalCenter: parent.verticalCenter
TapHandler {
onTapped: root._pinned = !root._pinned
}
}
M.HoverPanel {
@ -27,6 +24,7 @@ M.PinnableSection {
panelNamespace: "nova-weather"
panelTitle: "Weather"
contentWidth: 280
onDismissed: root.dismissPanel()
C.WeatherApplet {
width: hoverPanel.contentWidth