From b2571050d42decb703dffa424e4d22276e6e04f7 Mon Sep 17 00:00:00 2001 From: Lemmy Date: Wed, 6 May 2026 18:54:32 -0400 Subject: [PATCH] weather: elevation as feet when using imperial units --- src/shell/control_center/weather_tab.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/shell/control_center/weather_tab.cpp b/src/shell/control_center/weather_tab.cpp index b32503906..a2c03cd59 100644 --- a/src/shell/control_center/weather_tab.cpp +++ b/src/shell/control_center/weather_tab.cpp @@ -681,7 +681,9 @@ void WeatherTab::sync(Renderer& renderer) { m_tempMinLabel->setText(!snapshot.forecastDays.empty() ? std::format("{}{}", temp, unit) : std::string("--")); } if (m_elevationLabel != nullptr) { - m_elevationLabel->setText(std::format("{}m", static_cast(snapshot.elevationM))); + const bool imperial = m_weather->useImperial(); + const int elevation = static_cast(imperial ? snapshot.elevationM * 3.28084 : snapshot.elevationM); + m_elevationLabel->setText(std::format("{}{}", elevation, imperial ? "ft" : "m")); } if (m_timeZoneLabel != nullptr) { // Use the last component of the IANA path ("America/Toronto" → "Toronto") to keep