NIcon new widget to simplify icons display

This commit is contained in:
quadbyte 2025-08-17 16:04:23 -04:00
parent 9bb9e7e015
commit ac8b4793d8
21 changed files with 64 additions and 127 deletions

View file

@ -26,10 +26,9 @@ NBox {
RowLayout {
spacing: Style.marginSmall * scaling
NText {
NIcon {
text: weatherReady ? LocationService.weatherSymbolFromCode(
LocationService.data.weather.current_weather.weathercode) : ""
font.family: "Material Symbols Outlined"
font.pointSize: Style.fontSizeXXL * 1.5 * scaling
color: Color.mPrimary
}
@ -94,9 +93,8 @@ NBox {
text: Qt.formatDateTime(new Date(LocationService.data.weather.daily.time[index]), "ddd")
color: Color.mOnSurface
}
NText {
NIcon {
text: LocationService.weatherSymbolFromCode(LocationService.data.weather.daily.weathercode[index])
font.family: "Material Symbols Outlined"
font.pointSize: Style.fontSizeXL * scaling
color: Color.mPrimary
}