Changeset 8912 in josm for trunk


Ignore:
Timestamp:
2015-10-19T23:06:42+02:00 (9 years ago)
Author:
simon04
Message:

fix #11151 - Not all buttons are shown in exit confirmation dialog

Use GridBagLayout to avoid disappearance of buttons.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/io/SaveLayersDialog.java

    r8855 r8912  
    88import java.awt.Component;
    99import java.awt.Dimension;
    10 import java.awt.FlowLayout;
    1110import java.awt.Graphics2D;
    1211import java.awt.GridBagConstraints;
     
    5049import org.openstreetmap.josm.gui.progress.SwingRenderingProgressMonitor;
    5150import org.openstreetmap.josm.gui.util.GuiHelper;
     51import org.openstreetmap.josm.tools.GBC;
    5252import org.openstreetmap.josm.tools.ImageProvider;
    5353import org.openstreetmap.josm.tools.Utils;
     
    101101    protected JPanel buildButtonRow() {
    102102        JPanel pnl = new JPanel();
    103         pnl.setLayout(new FlowLayout(FlowLayout.CENTER));
     103        pnl.setLayout(new GridBagLayout());
    104104
    105105        saveAndProceedAction = new SaveAndProceedAction();
    106106        model.addPropertyChangeListener(saveAndProceedAction);
    107         pnl.add(saveAndProceedActionButton = new JButton(saveAndProceedAction));
     107        pnl.add(saveAndProceedActionButton = new JButton(saveAndProceedAction), GBC.std().insets(5, 5, 5, 5).fill(GBC.HORIZONTAL));
    108108
    109109        discardAndProceedAction = new DiscardAndProceedAction();
    110110        model.addPropertyChangeListener(discardAndProceedAction);
    111         pnl.add(new JButton(discardAndProceedAction));
     111        pnl.add(new JButton(discardAndProceedAction), GBC.std().insets(0, 0, 5, 0).fill(GBC.HORIZONTAL));
    112112
    113113        cancelAction = new CancelAction();
    114         pnl.add(new JButton(cancelAction));
     114        pnl.add(new JButton(cancelAction), GBC.std().insets(0, 0, 5, 0).fill(GBC.HORIZONTAL));
    115115
    116116        JPanel pnl2 = new JPanel();
Note: See TracChangeset for help on using the changeset viewer.