mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 06:45:37 +08:00
feat(ui): Display pressure with fixed number of digits on weather page
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user