-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Use number dashes for invalid value placeholders #13700
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Use number dashes for invalid value placeholders #13700
Conversation
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR improves UI readability by replacing hyphens with en dashes (–) in all invalid value placeholder strings throughout the codebase. En dashes are visually wider and more uniform with numeric characters, making them more distinguishable from minus signs and improving overall readability when displaying unavailable or invalid data.
Key Changes:
- Updated the core
Fact::invalidValueString()method to use en dashes for all value types - Replaced hardcoded invalid value strings in both C++ and QML files with en dash equivalents
- Changed time format placeholders from
--:--:--to––:––:––and decimal placeholders from--.--to–.––
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/FactSystem/Fact.cc |
Updated core invalidValueString() method to return en dashes for all fact types (float, double, elapsed time, default) |
src/Vehicle/FactGroups/VehicleFactGroup.cc |
Changed Hobbs meter initialization placeholder from ----:--:-- to ––––:––:–– |
src/Vehicle/FactGroups/BatteryFactGroupListModel.cc |
Updated battery time remaining placeholder from --:--:-- to ––:––:–– |
src/UI/toolbar/EscIndicatorPage.qml |
Changed ESC indicator N/A value from -- to – |
src/QmlControls/InstrumentValueValue.qml |
Updated instrument value fallback from -- to – |
src/QmlControls/GPSIndicatorPage.qml |
Changed GPS value placeholder from --.-- to –.–– |
src/FlightDisplay/ProximityRadarValues.qml |
Updated proximity radar no-value string from --.-- to –.–– |
|
I don't think this looks better. I like the existing look better. |
That's fair. You mean the em dashes, or using number dashes in general? That last screenshot is with the further change to em dashes, this PR just does the switch to number dashes. You can see how this one looks in the screenshot in issue #13698. |
Correct |
| QString(decimalPlaces, QChar(u'–')); | ||
| case FactMetaData::valueTypeElapsedTimeInSeconds: | ||
| return QStringLiteral("--:--:--"); | ||
| return QStringLiteral("––:––:––"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to be clear, using this as an example. Since I think I said it wrong. I like the original version better where the indicator is made up of dashes or negative signs which show up as individual digits and don't blend together as a single bloc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think they just blend together because of the font, they look separate both in QtCreator and in QGC. They're just like hyphens, but wider (average digit width). Check the screenshot in #13698 to see how they look. To me it's much better than master, makes the fields jump less in size when they finally become valid. Also removes the inconsistency of using 2 dashes since these don't really look like a minus sign.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait how come the vertical speed and ground speed are 0? Should be invalid and using the placeholder string.


Use number dashes for invalid value placeholders
Description
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.
Checklist:
Related Issue
#13698
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.