Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma Mobile
KWeather
Commits
ea794a02
Commit
ea794a02
authored
Aug 02, 2021
by
Devin Lin
🎨
Browse files
Fix temperature and sunrise displays
parent
291b2f0c
Pipeline
#73128
passed with stage
in 17 seconds
Changes
3
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
src/qml/SunriseCard.qml
View file @
ea794a02
...
...
@@ -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
}
}
...
...
src/qml/WeatherDayDelegate.qml
View file @
ea794a02
...
...
@@ -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
{
...
...
src/weatherhour.h
View file @
ea794a02
...
...
@@ -54,11 +54,11 @@ public:
QString
windSpeed
()
const
;
QString
temperature
()
const
{
return
Kweather
::
tempC
onvert
er
(
hour
().
temperature
());
return
QString
::
number
(
Kweather
::
c
onvert
Temp
(
hour
().
temperature
())
,
'f'
,
1
)
+
"°"
;
}
QString
temperatureRounded
()
const
{
return
Kweather
::
tempC
onvert
er
(
hour
().
temperature
());
return
QString
::
number
(
qRound
(
Kweather
::
c
onvert
Temp
(
hour
().
temperature
())
))
+
"°"
;
}
qreal
humidity
()
const
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment