sparrow icon indicating copy to clipboard operation
sparrow copied to clipboard

Add uniform string length formatting to MixStatusCell text

Open RequestPrivacy opened this issue 2 years ago • 2 comments

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 mixesDone orders of magnitude)?
  • [ ] Are the ProgressBars aligned for Premix- & Postmix wallets?
  • [ ] Are all ProgressBars updated immediately if the highest order of a mixesDone changes e.g. from 9 -> 10?

RequestPrivacy avatar Nov 14 '22 10:11 RequestPrivacy

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.

craigraw avatar Nov 14 '22 11:11 craigraw

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?

RequestPrivacy avatar Nov 14 '22 13:11 RequestPrivacy