WeatherCard: keep the name for long location name (split around the comma)

This commit is contained in:
quadbyte 2025-08-12 15:39:33 -04:00
parent 6f0b0b299f
commit b7332cc2e0

View file

@ -35,7 +35,11 @@ NBox {
ColumnLayout { ColumnLayout {
spacing: -Style.marginTiny * scaling spacing: -Style.marginTiny * scaling
NText { NText {
text: Settings.data.location.name text: {
// Ensure the name is not too long if one had to specify the country
const chunks = Settings.data.location.name.split(",")
return chunks[0]
}
font.weight: Style.fontWeightBold font.weight: Style.fontWeightBold
font.pointSize: Style.fontSizeXL * scaling font.pointSize: Style.fontSizeXL * scaling
} }