Changeset 7483 in josm


Ignore:
Timestamp:
2014-09-02T00:23:04+02:00 (10 years ago)
Author:
Don-vip
Message:

see #10455 - cross-platform UI tuning to avoid waste of space with platform-dependant native layouts (seen on OS X)

Location:
trunk/src/org/openstreetmap/josm/gui
Files:
2 edited

Legend:

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

    r7218 r7483  
    2626import javax.swing.AbstractButton;
    2727import javax.swing.Action;
     28import javax.swing.BorderFactory;
    2829import javax.swing.BoxLayout;
    2930import javax.swing.ButtonGroup;
     
    403404     * locations.
    404405     *
    405      * @param panel The container to fill. Must have an BorderLayout.
     406     * @param panel The container to fill. Must have a BorderLayout.
    406407     */
    407408    public void fillPanel(Container panel) {
     
    411412         * sideToolBar: add map modes icons
    412413         */
    413         if(Main.pref.getBoolean("sidetoolbar.mapmodes.visible", true)) {
    414         toolBarActions.setAlignmentX(0.5f);
     414        if (Main.pref.getBoolean("sidetoolbar.mapmodes.visible", true)) {
     415            toolBarActions.setAlignmentX(0.5f);
     416            toolBarActions.setBorder(null);
    415417            toolBarActions.setInheritsPopupMenu(true);
    416418            sideToolBar.add(toolBarActions);
     
    425427         * sideToolBar: add toggle dialogs icons
    426428         */
    427         if(Main.pref.getBoolean("sidetoolbar.toggledialogs.visible", true)) {
     429        if (Main.pref.getBoolean("sidetoolbar.toggledialogs.visible", true)) {
    428430            ((JToolBar)sideToolBar).addSeparator(new Dimension(0,18));
    429431            toolBarToggle.setAlignmentX(0.5f);
     432            toolBarToggle.setBorder(null);
    430433            toolBarToggle.setInheritsPopupMenu(true);
    431434            sideToolBar.add(toolBarToggle);
     
    490493        });
    491494        ((JToolBar)sideToolBar).setFloatable(false);
     495        sideToolBar.setBorder(BorderFactory.createEmptyBorder(0,1,0,1));
    492496
    493497        /**
  • trunk/src/org/openstreetmap/josm/gui/MapStatus.java

    r7135 r7483  
    5151
    5252import org.openstreetmap.josm.Main;
    53 import org.openstreetmap.josm.data.SystemOfMeasurement;
    5453import org.openstreetmap.josm.data.Preferences.PreferenceChangeEvent;
    5554import org.openstreetmap.josm.data.Preferences.PreferenceChangedListener;
     55import org.openstreetmap.josm.data.SystemOfMeasurement;
    5656import org.openstreetmap.josm.data.coor.CoordinateFormat;
    5757import org.openstreetmap.josm.data.coor.LatLon;
     
    299299                                // produces several events as well, which would make this
    300300                                // variable true. Of course we only want the popup to show
    301                                 // if the middle mouse button has been pressed in the first
    302                                 // place
     301                                // if the middle mouse button has been pressed in the first place
    303302                                boolean mouseNotMoved = oldMousePos != null
    304303                                        && oldMousePos.equals(ms.mousePos);
     
    722721
    723722        private final JMenuItem jumpButton = add(Main.main.menu.jumpToAct);
    724        
     723
    725724        private final Collection<JCheckBoxMenuItem> somItems = new ArrayList<>();
    726        
     725
    727726        private final JSeparator separator = new JSeparator();
    728727
     
    782781        this.mv = mapFrame.mapView;
    783782        this.collector = new Collector(mapFrame);
    784        
     783
    785784        // Context menu of status bar
    786785        setComponentPopupMenu(new MapStatusPopupMenu());
     
    817816
    818817        setLayout(new GridBagLayout());
    819         setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
     818        setBorder(BorderFactory.createEmptyBorder(1,2,1,2));
    820819
    821820        latText.setInheritsPopupMenu(true);
     
    834833            distText.addMouseListener(new MouseAdapter() {
    835834                private final List<String> soms = new ArrayList<>(new TreeSet<>(SystemOfMeasurement.ALL_SYSTEMS.keySet()));
    836    
     835
    837836                @Override
    838837                public void mouseClicked(MouseEvent e) {
     
    882881        thread.start();
    883882    }
    884    
     883
    885884    /**
    886885     * Updates the system of measurement and displays a notification.
Note: See TracChangeset for help on using the changeset viewer.