Changeset 16418 in josm


Ignore:
Timestamp:
2020-05-16T00:08:02+02:00 (3 weeks ago)
Author:
simon04
Message:

PlaceSelection: use GridBagLayout for better spacing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/download/PlaceSelection.java

    r15586 r16418  
    88import java.awt.Dimension;
    99import java.awt.GridBagLayout;
    10 import java.awt.GridLayout;
    1110import java.awt.event.ActionEvent;
    1211import java.awt.event.MouseAdapter;
     
    9998
    10099    protected JPanel buildSearchPanel() {
    101         JPanel lpanel = new JPanel(new GridLayout(2, 2));
     100        JPanel lpanel = new JPanel(new GridBagLayout());
    102101        JPanel panel = new JPanel(new GridBagLayout());
    103102
    104         lpanel.add(new JLabel(tr("Choose the server for searching:")));
    105         lpanel.add(server);
     103        lpanel.add(new JLabel(tr("Choose the server for searching:")), GBC.std(0, 0).weight(0, 0).insets(0, 0, 5, 0));
     104        lpanel.add(server, GBC.std(1, 0).fill(GBC.HORIZONTAL));
    106105        String s = Config.getPref().get("namefinder.server", SERVERS[0].name);
    107106        for (int i = 0; i < SERVERS.length; ++i) {
     
    110109            }
    111110        }
    112         lpanel.add(new JLabel(tr("Enter a place name to search for:")));
     111        lpanel.add(new JLabel(tr("Enter a place name to search for:")), GBC.std(0, 1).weight(0, 0).insets(0, 0, 5, 0));
    113112
    114113        cbSearchExpression = new HistoryComboBox();
    115114        cbSearchExpression.setToolTipText(tr("Enter a place name to search for"));
    116115        cbSearchExpression.setPossibleItemsTopDown(Config.getPref().getList(HISTORY_KEY, Collections.emptyList()));
    117         lpanel.add(cbSearchExpression);
     116        lpanel.add(cbSearchExpression, GBC.std(1, 1).fill(GBC.HORIZONTAL));
    118117
    119118        panel.add(lpanel, GBC.std().fill(GBC.HORIZONTAL).insets(5, 5, 0, 5));
Note: See TracChangeset for help on using the changeset viewer.