Changeset 1316 in josm


Ignore:
Timestamp:
2009-01-21T11:56:25+01:00 (11 years ago)
Author:
stoecker
Message:

fix ToggleDialog. Patch by Detlef Reichl

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java

    r1288 r1316  
    9494        ImageIcon inIcon = ImageProvider.get("dialogs", iconName);
    9595        ImageIcon smallIcon = new ImageIcon(inIcon.getImage().getScaledInstance(16 , 16, Image.SCALE_SMOOTH));
    96         JLabel labelSmallIcon = new JLabel(smallIcon);
    97         titleBar.add(labelSmallIcon);
     96        JLabel firstPart = new JLabel(name, smallIcon, JLabel.TRAILING);
     97        firstPart.setIconTextGap(8);
     98        titleBar.add(firstPart, GBC.std());
     99        titleBar.add(Box.createHorizontalGlue(),GBC.std().fill(GBC.HORIZONTAL));
    98100
    99101        final ActionListener hideActionListener = new ActionListener(){
     
    144146        };
    145147        titleBar.addMouseListener(titleMouseListener);
    146 
    147         // add some padding space (there must be a better way to do this!)
    148         JLabel padding = new JLabel(" ");
    149         titleBar.add(padding);
    150 
    151         // show the title label
    152         label.setText(name);
    153         titleBar.add(label, GBC.std());
    154         titleBar.add(Box.createHorizontalGlue(),GBC.std().fill(GBC.HORIZONTAL));
    155148
    156149        // show the sticky button
Note: See TracChangeset for help on using the changeset viewer.