qgroundcontrol icon indicating copy to clipboard operation
qgroundcontrol copied to clipboard

Fix the `--.-` display for no value

Open DonLakeFlyer opened this issue 3 weeks ago • 4 comments

It seems visually odd with the misbalanced dashes. Much better to always be '-.-'

@rubenp02 FYI: I've been seeing what this looks like in the UI and it's quite strange looking when it shows up.

DonLakeFlyer avatar Dec 04 '25 19:12 DonLakeFlyer

You mean the whole invalid strings stuff or using two dashes? I did think it looked weird as well which is why I initially used a single dash for the integer part. But as you pointed out that does make Facts with no decimals look like a minus sign.

rubenp02 avatar Dec 04 '25 19:12 rubenp02

No the whole thing just the dashes display. -- for no decimal is fine but I was seeing --.- in some places for decimals which just looks strange. That should just be -.-.

DonLakeFlyer avatar Dec 04 '25 19:12 DonLakeFlyer

I'd find that fairly inconsistent. Maybe we should use number dashes ("–")? In the QGC font they are clearly different from dashes and the minus sign, but they're still not as wide as em dashes which would look quite weird. And they're supposedly meant to be the same width as numbers. Might be exactly what we're looking for.

rubenp02 avatar Dec 04 '25 19:12 rubenp02

Just tried it out and I think it's perfect. Doesn't look like a minus sign when it's on its own whatsoever:

Image

I left a couple normal dashes in the seconds part of the Hobbs meter just for comparison.

LMK if I should open a PR with this.

rubenp02 avatar Dec 04 '25 20:12 rubenp02