fix: hide lock weather details on small screens

This commit is contained in:
2 * r + 2 * t 2026-06-02 22:01:54 +10:00
parent decd0ad654
commit 65fc4fb5f0
3 changed files with 7 additions and 0 deletions

View file

@ -33,6 +33,8 @@ StyledRect {
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
anchors.topMargin: Tokens.padding.extraLarge
rootHeight: root.rootHeight
}
Loader {

View file

@ -7,6 +7,8 @@ import qs.services
ColumnLayout {
id: root
required property int rootHeight
spacing: Tokens.spacing.extraSmall
StyledText {
@ -39,6 +41,7 @@ ColumnLayout {
}
StyledText {
visible: root.rootHeight > Tokens.sizes.lock.showWeatherDetailsHeight
Layout.alignment: Qt.AlignHCenter
animate: true
text: qsTr("Feels like %1").arg(Weather.temp)
@ -47,6 +50,7 @@ ColumnLayout {
}
StyledText {
visible: root.rootHeight > Tokens.sizes.lock.showWeatherDetailsHeight
Layout.alignment: Qt.AlignHCenter
animate: true
text: {

View file

@ -285,6 +285,7 @@ class LockTokens : public ConfigObject {
CONFIG_PROPERTY(qreal, heightMult, 0.7)
CONFIG_PROPERTY(qreal, ratio, 16.0 / 9.0)
CONFIG_PROPERTY(int, centerWidth, 600)
CONFIG_PROPERTY(int, showWeatherDetailsHeight, 500)
CONFIG_PROPERTY(int, showForecastHeight, 975)
CONFIG_PROPERTY(int, forecastItemWidth, 51)
CONFIG_PROPERTY(int, largeLogoWidth, 320)