nova-shell/shell/applets/WeatherApplet.qml

42 lines
1,017 B
QML

import QtQuick
import "../services" as S
Column {
id: root
required property color accentColor
// Weather icon + summary
Item {
width: parent.width
height: 28
Text {
anchors.left: parent.left
anchors.leftMargin: 12
anchors.verticalCenter: parent.verticalCenter
text: S.WeatherService.icon
color: root.accentColor
font.pixelSize: S.Theme.fontSize + 2
font.family: S.Theme.fontFamily
}
}
// Forecast details from wttrbar tooltip (may contain HTML from waybar format)
Text {
width: parent.width - 24
anchors.horizontalCenter: parent.horizontalCenter
text: S.WeatherService.tooltip
textFormat: Text.RichText
color: S.Theme.base05
font.pixelSize: S.Theme.fontSize - 2
font.family: S.Theme.fontFamily
wrapMode: Text.WordWrap
lineHeight: 1.3
}
Item {
width: 1
height: 4
}
}