Changeset 12396 in josm
- Timestamp:
- 2017-06-11T15:43:41+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/layer/LayerVisibilityAction.java
r12395 r12396 21 21 import javax.swing.AbstractAction; 22 22 import javax.swing.BorderFactory; 23 import javax.swing.Icon; 23 24 import javax.swing.ImageIcon; 24 25 import javax.swing.JCheckBox; … … 29 30 import javax.swing.JPopupMenu; 30 31 import javax.swing.JSlider; 32 import javax.swing.UIManager; 31 33 import javax.swing.border.Border; 32 34 … … 95 97 96 98 private void addContentEntry(LayerVisibilityMenuEntry slider) { 97 content.add(slider.getPanel(), GBC.eop() );99 content.add(slider.getPanel(), GBC.eop().fill(GBC.HORIZONTAL)); 98 100 sliders.add(slider); 99 101 } … … 181 183 VisibilityCheckbox() { 182 184 super(tr("Show layer")); 185 186 // Align all texts 187 Icon icon = UIManager.getIcon("CheckBox.icon"); 188 int iconWidth = icon == null ? 20 : icon.getIconWidth(); 189 setBorder(BorderFactory.createEmptyBorder(0, Math.max(24 + 5 - iconWidth, 0), 0, 0)); 183 190 addChangeListener(e -> setVisibleFlag(isSelected())); 184 191 } … … 223 230 224 231 add(new JLabel(getIcon()), GBC.std().span(1, 2).insets(0, 0, 5, 0)); 225 add(new JLabel(getLabel()), GBC.eol() );232 add(new JLabel(getLabel()), GBC.eol().insets(5, 0, 5, 0)); 226 233 add(slider, GBC.eol()); 227 234 addMouseWheelListener(this::mouseWheelMoved); … … 539 546 public ColorSelector() { 540 547 super(new GridBagLayout()); 548 add(new JLabel(tr("Color")), GBC.eol().insets(24 + 10, 0, 0, 0)); 541 549 for (Color color : COLORS) { 542 550 addPanelForColor(color);
Note:
See TracChangeset
for help on using the changeset viewer.