* Include byte unit in quota strings
Fixes#2590
I expect to continue to iterate on some of the ideas in the comments
thereon, but this fixes the proximate issue mentioned in the issue.
This includes changes to the interface to properly interpret the new
strings:
- Remove the UI-based `B` designations as they are now tagged with
units from the api
- Let parseInt do its magic with string-y numbers plus units
- Expand parseInt for use in the checking whether quota is set
The display will be better in this `Glitter` case. This may well be
considered a breaking change for the API and not applied.
* Reduce computation slightly
No need to iterate over the evenly spaced unit sizes.
We can determine its magnitude quickly and convert it
into an index for our tags.
Avoiding the repeated divisons might also reduce error, but it is
unlikely to be noticeable.
* Drop trailing space when no units
The issue didn't expressly complain, but there is a trailing space when
all of the other unit information is empty. Might as well not include
it when it clearly will happen.
The use of `f-strings` might also simplify future maintenance.
* Better document to_units methodology
This addresses some code review concerns with respect to readability.
Frankly, having this much exposition in the comments might imply that
it's a lot less obvious than I thought at initial writing.
This also maps everything under `1024` directly to `0`. This avoids
concerns about potentially generating negative indices into the tags
tuple which would be surprising and wildly incorrect.
* Make UI theme selection a non-advanced setting
* Call stylesheet a "theme" instead of a "skin"
---------
Co-authored-by: sbalbrecht <stpehen.b.albrecht@gmail.com>
It was relevant in Python 2.7-days.
This was we also don't make any external HTTP calls on start-up anymore, so hopefully we upset less virus scanners.