36 lines
889 B
QML
36 lines
889 B
QML
import QtQuick
|
|
import Quickshell
|
|
import "." as M
|
|
import "../services" as S
|
|
import "../applets" as C
|
|
|
|
M.PinnableSection {
|
|
id: root
|
|
spacing: S.Theme.moduleSpacing
|
|
visible: S.Modules.weather.enable && S.WeatherService.available
|
|
_panelHovered: hoverPanel.panelHovered
|
|
|
|
M.BarIcon {
|
|
icon: S.WeatherService.icon
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
TapHandler {
|
|
onTapped: root._pinned = !root._pinned
|
|
}
|
|
}
|
|
|
|
M.HoverPanel {
|
|
id: hoverPanel
|
|
showPanel: root._showPanel
|
|
screen: QsWindow.window?.screen ?? null
|
|
anchorItem: root
|
|
accentColor: root.accentColor
|
|
panelNamespace: "nova-weather"
|
|
panelTitle: "Weather"
|
|
contentWidth: 280
|
|
|
|
C.WeatherApplet {
|
|
width: hoverPanel.contentWidth
|
|
accentColor: root.accentColor
|
|
}
|
|
}
|
|
}
|