Vertical alignment of variable-width size column around decimal point

Have a suggestion for "Everything"? Please post it here.
Post Reply
eugenesv
Posts: 30
Joined: Fri Mar 04, 2016 7:03 pm

Vertical alignment of variable-width size column around decimal point

Post by eugenesv »

There is a very useful feature in Everything that changes the format of the size number depending on its value (e.g. between 900KB and 1.20MB instead of 1200KB). However, the way it's currently implemented, there is no proper alignment (see illustration below).
I'd like to propose using special different-width spaces to fix it and have all numbers aligned vertically around decimal point to make it easy to spot the difference between orders of magnitude differences within one format range (e.g. 1.11MB vs 111MB)

Current view, lacking vertical alignment:
111 k - label is misasligned: a) only 1 space b) decimal point width ≠ number width in some fonts
11.1 k
1.11 k - this looks bigger than 111 even though it's a hundred times smaller!

Proposed view, with perfect vertical alignment even with variable-width fonts
111    k Punctuation Space in place of decimal point, Figure Space elsewhere, Hair Space separates numbers and labels
 11.1  k
  1.11 k Hair Space separator between the number and the label (this helps slightly reduce the amount of whitespace)

Links to symbols used here: Figure Space, Punctuation Space, Hair Space

One more tricky point: given that the labels themselves have different widths and break the alignment, you'd need to either
  • Since the maximum number width is known (3 digits left of decimal point max, then the prefix changes), make the whole column left-aligned (the numbers with fewer than 3 digits are left-padded with Figure Space), then the variable width of the last symbol would be irrelevant to the alignment of the numbers
  • Use a different fixed-width font for either the whole column or at least the labels
  • Move the labels to a separate column so that the numbers are aligned w/o them
Same views without comments
Old:
111 k
11.1 k
1.11 k
New:
111    k
 11.1  k
  1.11 k

And the same views with a fixed-width font in code tags

Code: Select all

Old:
111 k
11.1 k
1.11 k
New:
111    k
 11.1  k 
  1.11 k
Last edited by eugenesv on Wed Jun 03, 2020 7:44 pm, edited 1 time in total.
therube
Posts: 4955
Joined: Thu Sep 03, 2009 6:48 pm

Re: Vertical alignment of variable-width size column around decimal point

Post by therube »

(
That was basically my reasoning for:
Never cared for the [layout] of Auto [i.e., mixed] because it is not "readable" [in any easy manner].
)
eugenesv
Posts: 30
Joined: Fri Mar 04, 2016 7:03 pm

Re: Vertical alignment of variable-width size column around decimal point

Post by eugenesv »

therube wrote: Wed Jun 03, 2020 6:46 pm That was basically my reasoning for:
Never cared for the [layout] of Auto [i.e., mixed] because it is not "readable" [in any easy manner].
Yeah, makes sense. However, when going into the Gigabyte territory, this becomes rather unwieldy as well, and this formatting allows a combination of the benefits of both approaches — shorter, but clearer and still allowing for having most of the details (165 instead of 0.00m)
By the way, that's the reason for uppercase G vs lowercase k and m — for easier differentiation. Ideally you'd also be able to set other font features for the labels (bold/color) to make the differentiation instant, but for me the alignment described above is good enough and makes Auto usable
Also, this formatting approach, when used without the "bytes" label (replaced by a blank string) makes the lowly bytes shown to the right of the decimal point (there is enough space there), so they'd never get confused with the higher ranks :)
void
Developer
Posts: 16683
Joined: Fri Oct 16, 2009 11:31 pm

Re: Vertical alignment of variable-width size column around decimal point

Post by void »

Thank you for the decimal alignment suggestion.

I'll consider adding something like this.
Post Reply