From 9774857169213b908c69efb6c3b7e84acf4ec8c8 Mon Sep 17 00:00:00 2001 From: Lars Toenning Date: Fri, 24 Nov 2023 21:39:29 +0100 Subject: [PATCH] feat(ui): Display pressure with fixed number of digits on weather page --- src/blackgui/components/weathercomponent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/blackgui/components/weathercomponent.cpp b/src/blackgui/components/weathercomponent.cpp index dbdfe9519d..2fe98afab0 100644 --- a/src/blackgui/components/weathercomponent.cpp +++ b/src/blackgui/components/weathercomponent.cpp @@ -254,7 +254,7 @@ namespace BlackGui::Components const CCoordinateGeodetic position = gridPoint.getPosition(); const double pressureAtMslHpa = gridPoint.getPressureAtMsl().value(CPressureUnit::hPa()); const double pressureAtMslInHg = gridPoint.getPressureAtMsl().value(CPressureUnit::inHg()); - const QString status = QStringLiteral("Weather Position: %1 %2\nPressure (MSL): %3 hPa / %4 inHg").arg(position.latitude().toWgs84(), position.longitude().toWgs84()).arg(pressureAtMslHpa).arg(pressureAtMslInHg); + const QString status = QStringLiteral("Weather Position: %1 %2\nPressure (MSL): %3 hPa / %4 inHg").arg(position.latitude().toWgs84(), position.longitude().toWgs84()).arg(pressureAtMslHpa, 0, 'f', 0).arg(pressureAtMslInHg, 0, 'f', 2); ui->lbl_Status->setText(status); }