Changeset 12043 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2017-05-03T13:25:51+02:00 (8 years ago)
Author:
michael2402
Message:

Add nicer padding to version info panel

File:
1 edited

Legend:

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

    r11848 r12043  
    99import java.awt.GridBagConstraints;
    1010import java.awt.GridBagLayout;
    11 import java.awt.GridLayout;
    1211import java.awt.Insets;
    1312import java.awt.event.ActionEvent;
     
    9897        pnl1.add(lblInfo, BorderLayout.CENTER);
    9998
    100         JPanel pnlUserAndChangeset = new JPanel(new GridLayout(2, 2));
     99        // +-----------------------+-------------------------------------+
     100        // | User:                 | lblUser                             |
     101        // +-----------------------+-------------------------------------+
     102        // | changesetButton       | lblChangeset | lblChangesetComments |
     103        // +-----------------------+-------------------------------------+
     104        JPanel pnlUserAndChangeset = new JPanel(new GridBagLayout());
     105        pnlUserAndChangeset.add(new JLabel(tr("User:")), GBC.std());
     106
    101107        lblUser = new UrlLabel("", 2);
    102         pnlUserAndChangeset.add(new JLabel(tr("User:")));
    103         pnlUserAndChangeset.add(lblUser);
    104         changesetButton.setMargin(new Insets(0, 0, 0, 0));
    105         pnlUserAndChangeset.add(changesetButton);
     108        pnlUserAndChangeset.add(lblUser, GBC.eol().insets(5, 0, 0, 0).weight(1, 0));
     109
     110        changesetButton.setMargin(new Insets(0, 0, 0, 2));
     111        pnlUserAndChangeset.add(changesetButton, GBC.std().fill().weight(0, 0));
     112
    106113        lblChangeset = new UrlLabel("", 2);
    107         final JPanel pnlChangesetInfo = new JPanel(new BorderLayout());
    108         pnlChangesetInfo.add(lblChangeset, BorderLayout.CENTER);
     114        pnlUserAndChangeset.add(lblChangeset, GBC.std().insets(5, 0, 0, 0).weight(1, 0));
     115
    109116        lblChangesetComments.setAction(changesetCommentsDialogAction);
    110117        lblChangesetComments.setMargin(new Insets(0, 0, 0, 0));
    111118        lblChangesetComments.setIcon(new ImageProvider("dialogs/notes/note_comment").setMaxSize(12).get());
    112         pnlChangesetInfo.add(lblChangesetComments, BorderLayout.EAST);
    113         pnlUserAndChangeset.add(pnlChangesetInfo);
     119        pnlUserAndChangeset.add(lblChangesetComments, GBC.eol());
    114120
    115121        texChangesetComment = buildTextArea(tr("Changeset comment"));
Note: See TracChangeset for help on using the changeset viewer.