Changeset 16914 in josm


Ignore:
Timestamp:
2020-08-23T17:23:26+02:00 (21 months ago)
Author:
simon04
Message:

see #19699 - OSMDownloadSource: left align, improve spacing

File:
1 edited

Legend:

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

    r16893 r16914  
    77import java.awt.Color;
    88import java.awt.Dimension;
     9import java.awt.FlowLayout;
    910import java.awt.Font;
    1011import java.awt.GridBagLayout;
     
    213214                    dialog.getSelectedDownloadArea().ifPresent(this::updateSizeCheck);
    214215
    215             // adding the download tasks
    216             add(new JLabel(tr(DATA_SOURCES_AND_TYPES)), GBC.std().insets(5, 5, 1, 5).anchor(GBC.CENTER));
    217             Font labelFont = sizeCheck.getFont();
    218             sizeCheck.setFont(labelFont.deriveFont(Font.PLAIN, labelFont.getSize()));
    219 
    220             downloadSourcesPanel = new JPanel();
    221             add(downloadSourcesPanel, GBC.eol().anchor(GBC.EAST));
     216            downloadSourcesPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
     217            add(downloadSourcesPanel, GBC.eol().fill(GBC.HORIZONTAL));
    222218            updateSources();
    223             add(sizeCheck, GBC.eol().anchor(GBC.EAST).insets(5, 5, 5, 2));
     219
     220            sizeCheck.setFont(sizeCheck.getFont().deriveFont(Font.PLAIN));
     221            JPanel sizeCheckPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
     222            sizeCheckPanel.add(sizeCheck);
     223            add(sizeCheckPanel, GBC.eol().fill(GBC.HORIZONTAL));
    224224
    225225            setMinimumSize(new Dimension(450, 115));
     
    231231        protected void updateSources() {
    232232            downloadSourcesPanel.removeAll();
     233            downloadSourcesPanel.add(new JLabel(tr(DATA_SOURCES_AND_TYPES)));
    233234            DOWNLOAD_SOURCES
    234                 .forEach(obj -> downloadSourcesPanel.add(obj.getCheckBox(checkboxChangeListener), GBC.std().insets(1, 5, 1, 5)));
     235                .forEach(obj -> downloadSourcesPanel.add(obj.getCheckBox(checkboxChangeListener)));
    235236        }
    236237
Note: See TracChangeset for help on using the changeset viewer.