diff --git a/ui/ForecastDelegate.qml b/ui/ForecastDelegate.qml index a9897140..c16452f9 100644 --- a/ui/ForecastDelegate.qml +++ b/ui/ForecastDelegate.qml @@ -14,15 +14,16 @@ WeatherDelegate { spacing: proportionalGridUnit * 10 Repeater { id: forecastRepeater - model: sessionData.forecast.first delegate: GridLayout { columns: 2 rowSpacing: proportionalGridUnit * 5 columnSpacing: proportionalGridUnit * 5 Layout.fillWidth: true + Layout.fillHeight: true + LottieAnimation { Layout.alignment: Qt.AlignCenter - Layout.preferredHeight: proportionalGridUnit * 20 + Layout.preferredHeight: proportionalGridUnit * 30 Layout.preferredWidth: Layout.preferredHeight source: Qt.resolvedUrl(getWeatherImagery(modelData.weathercode)) @@ -34,17 +35,17 @@ WeatherDelegate { font.weight: Font.Bold horizontalAlignment: Text.AlignHCenter Layout.fillWidth: true - Layout.preferredHeight: proportionalGridUnit * 15 - font.pixelSize: parent.height * 0.50 + Layout.preferredHeight: proportionalGridUnit * 30 + font.pixelSize: height * 0.90 text: modelData.date } Label { font.weight: Font.Bold Layout.fillWidth: true - Layout.preferredHeight: proportionalGridUnit * 20 + Layout.preferredHeight: proportionalGridUnit * 30 rightPadding: -font.pixelSize * 0.1 - font.pixelSize: parent.height * 0.50 + font.pixelSize: height * 0.90 horizontalAlignment: Text.AlignHCenter text: modelData.max + "°" } @@ -52,11 +53,11 @@ WeatherDelegate { Label { font.styleName: "Thin" Layout.fillWidth: true - Layout.preferredHeight: proportionalGridUnit * 20 + Layout.preferredHeight: proportionalGridUnit * 30 rightPadding: -font.pixelSize * 0.1 - font.pixelSize: parent.height * 0.50 + font.pixelSize: height * 0.90 horizontalAlignment: Text.AlignHCenter - text: modelData.min + "°" + text: modelData.min + "°" } } } diff --git a/ui/weather.qml b/ui/weather.qml index a280a317..1c7ce476 100644 --- a/ui/weather.qml +++ b/ui/weather.qml @@ -36,6 +36,7 @@ WeatherDelegate { id: temperature font.weight: Font.Bold Layout.fillWidth: true + horizontalAlignment: Text.AlignHCenter Layout.preferredHeight: proportionalGridUnit * 40 font.pixelSize: parent.height * 0.65 rightPadding: -font.pixelSize * 0.1