nosignal-shell/modules/lock/Content.qml
2 * r + 2 * t 87b491d8e7 lock: add weather
Also refactor weather service
2025-08-10 23:15:32 +10:00

76 lines
1.8 KiB
QML

import qs.components
import qs.services
import qs.config
import QtQuick
import QtQuick.Layouts
RowLayout {
id: root
required property var lock
property real centerScale
anchors.fill: parent
anchors.margins: Appearance.padding.large
spacing: Appearance.spacing.large
ColumnLayout {
Layout.fillWidth: true
spacing: Appearance.spacing.normal
StyledRect {
Layout.fillWidth: true
implicitHeight: weather.implicitHeight
radius: Appearance.rounding.small
color: Colours.tPalette.m3surfaceContainer
WeatherInfo {
id: weather
}
}
StyledRect {
Layout.fillWidth: true
Layout.fillHeight: true
radius: Appearance.rounding.small
color: Colours.tPalette.m3surfaceContainer
}
}
Center {
Layout.leftMargin: -(1 - scale) * implicitWidth / 2
Layout.rightMargin: -(1 - scale) * implicitWidth / 2
scale: root.centerScale
lock: root.lock
}
ColumnLayout {
Layout.fillWidth: true
spacing: Appearance.spacing.normal
StyledRect {
Layout.fillWidth: true
Layout.fillHeight: true
radius: Appearance.rounding.small
color: Colours.tPalette.m3surfaceContainer
}
StyledRect {
Layout.fillWidth: true
Layout.fillHeight: true
radius: Appearance.rounding.small
color: Colours.tPalette.m3surfaceContainer
}
}
component Anim: NumberAnimation {
duration: Appearance.anim.durations.normal
easing.type: Easing.BezierSpline
easing.bezierCurve: Appearance.anim.curves.standard
}
}