Changeset d7e5aaf for core


Ignore:
Timestamp:
Mar 6, 2017 3:46:56 AM (3 years ago)
Author:
str4d <str4d@…>
Branches:
master
Children:
4bf0147
Parents:
10a021f
Message:

Replace   with thin non-breaking space   for byte sizes

The latter has more consistent/predictable width between fonts & point sizes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • core/java/src/net/i2p/data/DataHelper.java

    r10a021f rd7e5aaf  
    15611561        DecimalFormat fmt = new DecimalFormat("##0.00");
    15621562
     1563        // Replace &nbsp; with thin non-breaking space &#8239; (more consistent/predictable width between fonts & point sizes)
     1564
    15631565        String str = fmt.format(val);
    15641566        switch (scale) {
    1565             case 1: return str + "&nbsp;K";
    1566             case 2: return str + "&nbsp;M";
    1567             case 3: return str + "&nbsp;G";
    1568             case 4: return str + "&nbsp;T";
    1569             case 5: return str + "&nbsp;P";
    1570             case 6: return str + "&nbsp;E";
    1571             case 7: return str + "&nbsp;Z";
    1572             case 8: return str + "&nbsp;Y";
    1573             default: return bytes + "&nbsp;";
     1567            case 1: return str + "&#8239;K";
     1568            case 2: return str + "&#8239;M";
     1569            case 3: return str + "&#8239;G";
     1570            case 4: return str + "&#8239;T";
     1571            case 5: return str + "&#8239;P";
     1572            case 6: return str + "&#8239;E";
     1573            case 7: return str + "&#8239;Z";
     1574            case 8: return str + "&#8239;Y";
     1575            default: return bytes + "&#8239;";
    15741576        }
    15751577    }
Note: See TracChangeset for help on using the changeset viewer.