From 6904b43220bb62780ec6c46053f8c6cf03c3a915 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20P=C3=A9rez=20Alonso?= Date: Fri, 5 Dec 2025 13:30:55 +0100 Subject: [PATCH] Use number dashes for invalid value placeholders Replaced hyphens with number/en dashes in Fact::invalidValueString, as well as in all invalid-value placeholder strings. Also changed instances of 2 hyphens into a single en dash. En dashes are visually wider and more uniform with numeric characters, improving readability and preventing confusion with minus signs. --- src/FactSystem/Fact.cc | 10 +++++----- src/FlightDisplay/ProximityRadarValues.qml | 2 +- src/QmlControls/GPSIndicatorPage.qml | 2 +- src/QmlControls/InstrumentValueValue.qml | 2 +- src/UI/toolbar/EscIndicatorPage.qml | 2 +- src/Vehicle/FactGroups/BatteryFactGroupListModel.cc | 2 +- src/Vehicle/FactGroups/VehicleFactGroup.cc | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/FactSystem/Fact.cc b/src/FactSystem/Fact.cc index 564ed097787d..b756a4ad3736 100644 --- a/src/FactSystem/Fact.cc +++ b/src/FactSystem/Fact.cc @@ -386,14 +386,14 @@ QString Fact::invalidValueString(int decimalPlaces) const { case FactMetaData::valueTypeFloat: case FactMetaData::valueTypeDouble: if (decimalPlaces <= 0) { - return QStringLiteral("--"); + return QStringLiteral("–"); } - return QStringLiteral("--.") + - QString(decimalPlaces, QLatin1Char('-')); + return QStringLiteral("–.") + + QString(decimalPlaces, QChar(u'–')); case FactMetaData::valueTypeElapsedTimeInSeconds: - return QStringLiteral("--:--:--"); + return QStringLiteral("––:––:––"); default: - return QStringLiteral("--"); + return QStringLiteral("–"); } } diff --git a/src/FlightDisplay/ProximityRadarValues.qml b/src/FlightDisplay/ProximityRadarValues.qml index bb92183f1a1e..9f9996d796fe 100644 --- a/src/FlightDisplay/ProximityRadarValues.qml +++ b/src/FlightDisplay/ProximityRadarValues.qml @@ -40,7 +40,7 @@ QtObject { property var rgRotationValueStrings: [ rotationNoneValueString, rotationYaw45ValueString, rotationYaw90ValueString, rotationYaw135ValueString, rotationYaw180ValueString, rotationYaw225ValueString, rotationYaw270ValueString, rotationYaw315ValueString ] property var _distanceSensors: vehicle ? vehicle.distanceSensors : null - property string _noValueStr: qsTr("--.--") + property string _noValueStr: qsTr("–.––") onRotationNoneValueChanged: rotationValueChanged() onRotationYaw45ValueChanged: rotationValueChanged() diff --git a/src/QmlControls/GPSIndicatorPage.qml b/src/QmlControls/GPSIndicatorPage.qml index 3849c97df4f5..152d5a74a1ec 100644 --- a/src/QmlControls/GPSIndicatorPage.qml +++ b/src/QmlControls/GPSIndicatorPage.qml @@ -21,7 +21,7 @@ ToolIndicatorPage { property var activeVehicle: QGroundControl.multiVehicleManager.activeVehicle property string na: qsTr("N/A", "No data to display") - property string valueNA: qsTr("--.--", "No data to display") + property string valueNA: qsTr("–.––", "No data to display") property var rtkSettings: QGroundControl.settingsManager.rtkSettings property var useFixedPosition: rtkSettings.useFixedBasePosition.rawValue property var manufacturer: rtkSettings.baseReceiverManufacturers.rawValue diff --git a/src/QmlControls/InstrumentValueValue.qml b/src/QmlControls/InstrumentValueValue.qml index c8ef3b4fbbb1..afa307a1b62c 100644 --- a/src/QmlControls/InstrumentValueValue.qml +++ b/src/QmlControls/InstrumentValueValue.qml @@ -43,7 +43,7 @@ ColumnLayout { if (instrumentValueData.fact) { return instrumentValueData.fact.enumOrValueString + (instrumentValueData.showUnits ? " " + instrumentValueData.fact.units : "") } else { - return qsTr("--") + return qsTr("–") } } } diff --git a/src/UI/toolbar/EscIndicatorPage.qml b/src/UI/toolbar/EscIndicatorPage.qml index 75e35a81e327..ed97745b7b73 100644 --- a/src/UI/toolbar/EscIndicatorPage.qml +++ b/src/UI/toolbar/EscIndicatorPage.qml @@ -20,7 +20,7 @@ ToolIndicatorPage { property var activeVehicle: QGroundControl.multiVehicleManager.activeVehicle property string na: qsTr("N/A", "No data to display") - property string valueNA: qsTr("--", "No data to display") + property string valueNA: qsTr("–", "No data to display") property var _escs: activeVehicle ? activeVehicle.escs : null property int _onlineBitmask: _escs ? _escs.get(0).info.rawValue : 0 diff --git a/src/Vehicle/FactGroups/BatteryFactGroupListModel.cc b/src/Vehicle/FactGroups/BatteryFactGroupListModel.cc index 0012e4c29a2b..77a86224c9c0 100644 --- a/src/Vehicle/FactGroups/BatteryFactGroupListModel.cc +++ b/src/Vehicle/FactGroups/BatteryFactGroupListModel.cc @@ -156,7 +156,7 @@ void BatteryFactGroup::_handleBatteryStatus(Vehicle *vehicle, const mavlink_mess void BatteryFactGroup::_timeRemainingChanged(const QVariant &value) { if (qIsNaN(value.toDouble())) { - _timeRemainingStrFact.setRawValue("--:--:--"); + _timeRemainingStrFact.setRawValue("––:––:––"); } else { const int totalSeconds = value.toInt(); const int hours = totalSeconds / 3600; diff --git a/src/Vehicle/FactGroups/VehicleFactGroup.cc b/src/Vehicle/FactGroups/VehicleFactGroup.cc index 9ea23471dd57..2d0942398f0f 100644 --- a/src/Vehicle/FactGroups/VehicleFactGroup.cc +++ b/src/Vehicle/FactGroups/VehicleFactGroup.cc @@ -49,7 +49,7 @@ VehicleFactGroup::VehicleFactGroup(QObject *parent) _addFact(&_throttlePctFact); _addFact(&_imuTempFact); - _hobbsFact.setRawValue(QStringLiteral("----:--:--")); + _hobbsFact.setRawValue(QStringLiteral("––––:––:––")); } void VehicleFactGroup::handleMessage(Vehicle *vehicle, const mavlink_message_t &message)