sparrow
sparrow copied to clipboard
Add uniform string length formatting to MixStatusCell text
Intended to fix issue #598 by setting the string representation of each MixStatusCell to the length of the the length of the highest MixStatus.getMixesDone() encountered. This way the fixed-width gap to the ProgressBar graphic to the left results in the ProgressBars being aligned with each other in the "Mixes" column of Pre-& Postmix wallets UTXO tab.
I'm still figuring out my test environment, so would be glad for feedback/help on:
- [ ] Do the white-spaces added represent the width of a digit (i.e. are all ProgressBars aligned for all denominations and
mixesDoneorders of magnitude)? - [ ] Are the ProgressBars aligned for Premix- & Postmix wallets?
- [ ] Are all ProgressBars updated immediately if the highest order of a
mixesDonechanges e.g. from 9 -> 10?
Thanks for the PR.
The font used to display the mix count is unfortunately not a fixed width font, so this approach won't work (the digits are not consistent widths). There is a potential solution, but it requires a more complex rewrite of the mix status cell.
Yeah I guessed this could pose a problem during my rudimentary testing. Out of curiosity: do you intend to split the cell further into two parts, one for the graphic and one for the text?