Changeset 16917 in josm


Ignore:
Timestamp:
2020-08-23T17:42:30+02:00 (4 years ago)
Author:
simon04
Message:

see #19699 - Download dialog: add icon to "Zoom to downloaded data" checkbox

File:
1 edited

Legend:

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

    r16893 r16917  
    2424
    2525import javax.swing.AbstractAction;
     26import javax.swing.Box;
    2627import javax.swing.Icon;
    2728import javax.swing.JButton;
     
    164165        cbStartup.addActionListener(e -> DOWNLOAD_AUTORUN.put(cbStartup.isSelected()));
    165166
     167        JLabel iconZoomToDownloadedData = new JLabel(ImageProvider.get("dialogs/autoscale/data", ImageProvider.ImageSizes.SMALLICON));
    166168        cbZoomToDownloadedData = new JCheckBox(tr("Zoom to downloaded data"));
    167169        cbZoomToDownloadedData.setToolTipText(tr("Select to zoom to entire newly downloaded data."));
    168170
    169         mainPanel.add(cbStartup, GBC.std().anchor(GBC.WEST).insets(15, 5, 5, 5));
    170         mainPanel.add(cbZoomToDownloadedData, GBC.std().anchor(GBC.WEST).insets(15, 5, 5, 5));
     171        JPanel checkboxPanel = new JPanel(new FlowLayout());
     172        checkboxPanel.add(cbStartup);
     173        checkboxPanel.add(Box.createHorizontalStrut(6));
     174        checkboxPanel.add(iconZoomToDownloadedData);
     175        checkboxPanel.add(cbZoomToDownloadedData);
     176        mainPanel.add(checkboxPanel, GBC.eol());
    171177
    172178        ExpertToggleAction.addVisibilitySwitcher(cbZoomToDownloadedData);
    173 
    174         mainPanel.add(new JLabel(), GBC.eol()); // place info label at a new line
     179        ExpertToggleAction.addVisibilitySwitcher(iconZoomToDownloadedData);
     180
    175181        JLabel infoLabel = new JLabel(
    176182                tr("Use left click&drag to select area, arrows or right mouse button to scroll map, wheel or +/- to zoom."));
Note: See TracChangeset for help on using the changeset viewer.