Commit ea794a02 authored by Devin Lin's avatar Devin Lin 🎨
Browse files

Fix temperature and sunrise displays

parent 291b2f0c
Pipeline #73128 passed with stage
in 17 seconds
......@@ -43,7 +43,7 @@ Kirigami.Card {
color: root.textColor
}
Label {
text: Qt.formatTime(currentDay.sunrise.sunRise, Locale.ShortFormat)
text: Qt.formatTime(currentDay.sunrise.sunRise, "hh:mm ap")
color: root.textColor
}
}
......@@ -66,7 +66,7 @@ Kirigami.Card {
color: root.textColor
}
Label {
text: Qt.formatTime(currentDay.sunrise.sunSet, Locale.ShortFormat)
text: Qt.formatTime(currentDay.sunrise.sunSet, "hh:mm ap")
color: root.textColor
}
}
......
......@@ -55,14 +55,14 @@ Rectangle {
Label {
id: highTemp
font.pointSize: Kirigami.Theme.defaultFont.pointSize * 1.3
text: weather.maxTemp
text: Math.round(weather.maxTemp) + "°"
color: textColor
}
Label {
anchors.baseline: highTemp.baseline
color: settingsModel && settingsModel.forecastStyle === "Dynamic" ? KWeatherStyle.disabledTextColor : Kirigami.Theme.disabledTextColor
font.pointSize: Kirigami.Theme.defaultFont.pointSize * 1
text: weather.minTemp
text: Math.round(weather.minTemp) + "°"
}
}
Label {
......
......@@ -54,11 +54,11 @@ public:
QString windSpeed() const;
QString temperature() const
{
return Kweather::tempConverter(hour().temperature());
return QString::number(Kweather::convertTemp(hour().temperature()), 'f', 1) + "°";
}
QString temperatureRounded() const
{
return Kweather::tempConverter(hour().temperature());
return QString::number(qRound(Kweather::convertTemp(hour().temperature()))) + "°";
}
qreal humidity() const
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment