diff --git a/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java b/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java
index 2ecea9d1d2..0222510d95 100644
|
a
|
b
|
public class ToggleDialog extends JPanel implements ShowHideButtonListener, Help
|
| 103 | 103 | public static final BooleanProperty PROP_DYNAMIC_BUTTONS = new BooleanProperty("dialog.dynamic.buttons", false); |
| 104 | 104 | private static final String SELECTED = "selected"; |
| 105 | 105 | |
| | 106 | private static final int TITLE_HEIGHT = |
| | 107 | (int)(20 * Config.getPref().getDouble("gui.scale", 1.0)); |
| | 108 | |
| 106 | 109 | private final transient ParametrizedEnumProperty<ButtonHidingType> propButtonHiding = |
| 107 | 110 | new ParametrizedEnumProperty<>(ButtonHidingType.class, ButtonHidingType.DYNAMIC) { |
| 108 | 111 | @Override |
| … |
… |
public class ToggleDialog extends JPanel implements ShowHideButtonListener, Help
|
| 442 | 445 | if (isDialogInDefaultView()) { |
| 443 | 446 | setContentVisible(false); |
| 444 | 447 | setIsCollapsed(true); |
| 445 | | setPreferredSize(new Dimension(0, 20)); |
| 446 | | setMaximumSize(new Dimension(Integer.MAX_VALUE, 20)); |
| 447 | | setMinimumSize(new Dimension(Integer.MAX_VALUE, 20)); |
| | 448 | setPreferredSize(new Dimension(0, TITLE_HEIGHT)); |
| | 449 | setMaximumSize(new Dimension(Integer.MAX_VALUE, TITLE_HEIGHT)); |
| | 450 | setMinimumSize(new Dimension(Integer.MAX_VALUE, TITLE_HEIGHT)); |
| 448 | 451 | titleBar.lblMinimized.setIcon(ImageProvider.get("misc", "minimized")); |
| 449 | 452 | } else |
| 450 | 453 | throw new IllegalStateException(); |
| … |
… |
public class ToggleDialog extends JPanel implements ShowHideButtonListener, Help
|
| 569 | 572 | lblTitle.paint(g); |
| 570 | 573 | } |
| 571 | 574 | }; |
| 572 | | lblTitleWeak.setPreferredSize(new Dimension(Integer.MAX_VALUE, 20)); |
| 573 | | lblTitleWeak.setMinimumSize(new Dimension(0, 20)); |
| | 575 | lblTitleWeak.setPreferredSize(new Dimension(Integer.MAX_VALUE, TITLE_HEIGHT)); |
| | 576 | lblTitleWeak.setMinimumSize(new Dimension(0, TITLE_HEIGHT)); |
| 574 | 577 | add(lblTitleWeak, GBC.std().fill(GridBagConstraints.HORIZONTAL)); |
| 575 | 578 | |
| 576 | 579 | buttonsHide = new JButton(ImageProvider.get("misc", buttonHiding != ButtonHidingType.ALWAYS_SHOWN |