diff --git a/ui/DailyDelegateScalable.qml b/ui/DailyDelegateScalable.qml index 30b0deb2..076ef1b1 100644 --- a/ui/DailyDelegateScalable.qml +++ b/ui/DailyDelegateScalable.qml @@ -1,11 +1,3 @@ -import QtQuick.Layouts 1.4 -import QtQuick 2.4 -import QtQuick.Controls 2.0 -import org.kde.kirigami 2.4 as Kirigami - -import Mycroft 1.0 as Mycroft -import org.kde.lottie 1.0 - // Copyright 2021, Mycroft AI Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -26,6 +18,14 @@ Re-usable code to display two days forecast. This code written to be scalable for different screen sizes. It can be used on any device not conforming to the Mark II screen's form factor. */ +import QtQuick.Layouts 1.4 +import QtQuick 2.4 +import QtQuick.Controls 2.0 +import org.kde.kirigami 2.4 as Kirigami + +import Mycroft 1.0 as Mycroft +import org.kde.lottie 1.0 + WeatherDelegateScalable { id: root @@ -34,43 +34,50 @@ WeatherDelegateScalable { 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(modelData.weatherCondition) loops: Animation.Infinite fillMode: Image.PreserveAspectFit + running: true } - Mycroft.AutoFitLabel { + Label { font.weight: Font.Bold - horizontalAlignment: Text.AlignLeft + horizontalAlignment: Text.AlignHCenter Layout.fillWidth: true - Layout.preferredHeight: proportionalGridUnit * 15 + Layout.preferredHeight: proportionalGridUnit * 30 + font.pixelSize: height * 0.90 text: modelData.date } - Mycroft.AutoFitLabel { + Label { font.weight: Font.Bold Layout.fillWidth: true - Layout.preferredHeight: proportionalGridUnit * 20 + Layout.preferredHeight: proportionalGridUnit * 30 rightPadding: -font.pixelSize * 0.1 + font.pixelSize: height * 0.90 + horizontalAlignment: Text.AlignHCenter text: modelData.highTemperature + "°" } - Mycroft.AutoFitLabel { + Label { font.styleName: "Thin" Layout.fillWidth: true - Layout.preferredHeight: proportionalGridUnit * 20 + Layout.preferredHeight: proportionalGridUnit * 30 rightPadding: -font.pixelSize * 0.1 - text: modelData.lowTemperature + "°" + font.pixelSize: height * 0.90 + horizontalAlignment: Text.AlignHCenter + text: modelData.lowTemperature + "°" } } } diff --git a/ui/WeatherDelegateScalable.qml b/ui/WeatherDelegateScalable.qml index 3a9f7888..e73bab28 100644 --- a/ui/WeatherDelegateScalable.qml +++ b/ui/WeatherDelegateScalable.qml @@ -27,6 +27,7 @@ import Mycroft 1.0 as Mycroft Mycroft.ProportionalDelegate { id: root + skillBackgroundColorOverlay: Qt.rgba(0, 0, 0, 1) function getWeatherImagery(weathercode) { switch(weathercode) {