|
103 | 103 | public class DirectoryChooserUI extends BasicFileChooserUI { |
104 | 104 | private static final String DIALOG_IS_CLOSING = "JFileChooserDialogIsClosingProperty"; |
105 | 105 |
|
106 | | - private static final Dimension horizontalStrut1 = new Dimension(25, 1); |
| 106 | + private static final Dimension horizontalStrut1 = new Dimension(10, 1); |
107 | 107 | private static final Dimension verticalStrut1 = new Dimension(1, 4); |
108 | | - private static final Dimension verticalStrut2 = new Dimension(1, 6); |
109 | 108 | private static final Dimension verticalStrut3 = new Dimension(1, 8); |
110 | 109 | private static Dimension PREF_SIZE = new Dimension(425, 245); |
111 | 110 | private static Dimension MIN_SIZE = new Dimension(425, 245); |
@@ -476,9 +475,9 @@ public Dimension getMaximumSize() { |
476 | 475 | } |
477 | 476 | approveButton.addActionListener(getApproveSelectionAction()); |
478 | 477 | approveButton.setToolTipText(getApproveButtonToolTipText(fc)); |
479 | | - buttonPanel.add(Box.createRigidArea(verticalStrut1)); |
| 478 | + buttonPanel.add(Box.createRigidArea(verticalStrut3)); |
480 | 479 | buttonPanel.add(approveButton); |
481 | | - buttonPanel.add(Box.createRigidArea(verticalStrut2)); |
| 480 | + buttonPanel.add(Box.createRigidArea(verticalStrut3)); |
482 | 481 |
|
483 | 482 | cancelButton = new JButton(cancelButtonText) { |
484 | 483 | @Override |
@@ -650,7 +649,6 @@ private JComponent createTopToolbar() { |
650 | 649 | } |
651 | 650 |
|
652 | 651 | topPanel.add(upFolderButton); |
653 | | - topPanel.add(Box.createRigidArea(new Dimension(2, 0))); |
654 | 652 |
|
655 | 653 | // no home on Win platform |
656 | 654 | if (!Utilities.isWindows()) { |
@@ -710,11 +708,10 @@ private JComponent createTopToolbar() { |
710 | 708 | } |
711 | 709 |
|
712 | 710 | topPanel.add(newFolderButton); |
713 | | - topPanel.add(Box.createRigidArea(new Dimension(2, 0))); |
714 | 711 |
|
715 | 712 | JPanel panel = new JPanel(); |
716 | 713 | panel.setLayout(new BorderLayout()); |
717 | | - panel.setBorder(BorderFactory.createEmptyBorder(4, 9, 8, 0)); |
| 714 | + panel.setBorder(BorderFactory.createEmptyBorder(2, 9, 8, 0)); |
718 | 715 | panel.add(topPanel, BorderLayout.CENTER); |
719 | 716 |
|
720 | 717 | return panel; |
|
0 commit comments