amount column's left justification #1840

issue LukenShiro opened this issue on September 20, 2012
  1. LukenShiro commented at 9:44 AM on September 20, 2012: none

    I propose left side justification for amount column, as received/sent amounts are not well displayed. Now we have right side justification, e.g. |-------0.10| |----0.0001| |---0.00021| |-0.000008|

    My proposal's intent is to display, e.g.: |----0.10---------| |----0.0001-----| |----0.00021---| |----0.000008-|

  2. luke-jr commented at 9:48 AM on September 20, 2012: member

    Left side will look bad for more reasonable amounts (ie: 1, 10, 100, etc). I suggest what is needed is alignment of the ones column.

  3. LukenShiro commented at 9:57 AM on September 20, 2012: none

    luke-jr's comment makes sense to me. I agree.

  4. laanwj commented at 10:16 AM on September 20, 2012: member

    I've tried both, but right align ended up looking slightly better. Then again, I've mostly been testing with larger amounts.

    Aligning on '.' would be best, but Qt has no built-in option for that, so that'd need a custom delegate which renders the text so that the point is at a fixed position.

  5. luke-jr commented at 10:21 AM on September 20, 2012: member

    Something to consider for this: do we want a bunch of blank space to the right of every "normal" amount just because of one non-zero-Satoshi amount? Almost seems like at that point we might as well just use invisible/blank digits to pad it off on the right...

    I don't suppose Qt works with text-align: "." ?

  6. laanwj commented at 10:44 AM on September 20, 2012: member

    Alas, Qt doesn't work with text-align: ".". Html/css is not supported in table cells, so greying out or hiding digits would require a custom delegate just as well.

    The problem with bitcoin is the precision. In most cases in financial software you only want to show two digits to the right in these kinds of overviews, which doesn't look cluttered.

    Here, you want to show amounts of 10000 as well as 0.00001. Which would make the "amount" column requirement very wide, and result in empty space. And adding .00000000 to all whole-bitcoin amounts would look cluttered.

    (doing this properly is not trivial... and how to gracefully fall back if there is not enough space to display all decimals? maybe 0.00...? either that or fall back to right-align in that case...)

  7. luke-jr commented at 10:47 AM on September 20, 2012: member

    Nbsp?

  8. laanwj commented at 10:49 AM on September 20, 2012: member

    We don't use a monospace font for the amounts, so you could pad with nbsps alright, but that wouldn't line them up properly.

  9. luke-jr commented at 10:54 AM on September 20, 2012: member

    Maybe we should. Are non-monospace fonts guaranteed to line up using numbers in the first place?

  10. laanwj commented at 11:41 AM on September 20, 2012: member

    That depends on how you do the alignment... if you use font extents properly, it doesn't matter what kind of font you use.

    NAK on switching to monospace fonts on the amounts. I don't like how it looks, and it would make the "extra space" problem even worse. After all, monospace fonts are, by definition, wider on average for the same font size.

  11. Diapolo commented at 1:53 PM on January 8, 2013: none

    Can we close this, as after reading the discussion I think it's a no-issue.

  12. LukenShiro commented at 8:16 AM on January 9, 2013: none

    Ok.,As it seems devs do not agree with my proposal, I guess I can close it, indeed.

  13. LukenShiro closed this on Jan 9, 2013

  14. owlhooter referenced this in commit 476888683c on Oct 10, 2018
  15. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-21 18:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me