feat(ui): Display pressure with fixed number of digits on weather page

This commit is contained in:
Lars Toenning
2023-11-24 21:39:29 +01:00
parent 488f9dc119
commit 9774857169

View File

@@ -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);
}