Ignore:
Timestamp:
2018-05-26T23:13:23+02:00 (12 months ago)
Author:
Don-vip
Message:

fix #11949 - History dialog: insert <wbr> in username labels to preserve dialog layout for long usernames

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/history/VersionInfoPanel.java

    r13535 r13853  
    264264                username = user.getName();
    265265            }
    266             lblUser.setDescription(username);
     266            lblUser.setDescription(insertWbr(username), false);
    267267            if (user != null && user != User.getAnonymous()) {
    268268                lblUser.setUrl(getUserUrl(username));
     
    276276                lblUser.setUrl(null);
    277277            } else {
    278                 lblUser.setDescription(username);
     278                lblUser.setDescription(insertWbr(username), false);
    279279                lblUser.setUrl(getUserUrl(username));
    280280            }
     
    293293    }
    294294
     295    private static String insertWbr(String s) {
     296        return Utils.escapeReservedCharactersHTML(s).replace("_", "_<wbr>");
     297    }
     298
    295299    protected static void updateText(Changeset cs, String attr, JTextArea textArea, JLabel label, Changeset oppCs, JComponent container) {
    296300        final String text = cs != null ? cs.get(attr) : null;
Note: See TracChangeset for help on using the changeset viewer.