controls/LegendDelegate: use tabular numerals for value

The values change over time, and on proportional fonts this means that the width of the text changes (as 0 is a fair bit wider than 1). On frequently-changing values, this can produce quite a bit of unpleasant jitter, instead of neatly aligned values.

Many fonts provide tabular numerals that take up an equal width while otherwise maintaining the font's appearance. This leads to a much more orderly presentation of tabular data (such as tables of CPU cores), and consistent widths for things like uptime, which can otherwise shift around a fair bit in e.g. a system monitor Text Only panel widget.


Table presentation:

before after
legend_tnum_before legend_tnum_after

Note e.g. the comparison between 11% and other 1X% values

Shifting panel widgets with non-tabular numerals:

Merge request reports

Loading