Port the AGS widgets into the shell as plugins
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
import QtQuick
|
||||
import qs.Commons
|
||||
import qs.Ui
|
||||
|
||||
Card {
|
||||
id: root
|
||||
|
||||
property string place: "Loading..."
|
||||
property string glyph: ""
|
||||
property string temperature: ""
|
||||
property string wind: ""
|
||||
property bool available: false
|
||||
|
||||
implicitWidth: Style.spaceReal(190)
|
||||
|
||||
CardHeader {
|
||||
icon: root.available ? root.glyph : ""
|
||||
title: root.place
|
||||
}
|
||||
|
||||
Text {
|
||||
visible: !root.available
|
||||
text: "Weather unavailable"
|
||||
textFormat: Text.PlainText
|
||||
color: Util.alpha(Color.foreground, 0.7)
|
||||
font.family: Style.font.family
|
||||
font.pixelSize: Style.font.bodySmall
|
||||
}
|
||||
|
||||
StatRow {
|
||||
width: parent.width
|
||||
visible: root.available
|
||||
icon: ""
|
||||
label: "Temperature"
|
||||
value: root.temperature
|
||||
}
|
||||
|
||||
StatRow {
|
||||
width: parent.width
|
||||
visible: root.available
|
||||
icon: ""
|
||||
label: "Wind"
|
||||
value: root.wind
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user