nova-shell/shell/modules/WeatherModule.qml

34 lines
850 B
QML

import QtQuick
import Quickshell
import "." as M
import "../services" as S
import "../applets" as C
M.BarModule {
id: root
spacing: S.Theme.moduleSpacing
visible: S.Modules.weather.enable && S.WeatherService.available
tooltip: S.WeatherService.summary || "Weather"
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
}
}
}