Changeset 1237 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2009-01-11T00:17:01+01:00 (16 years ago)
Author:
stoecker
Message:

fixed #1602 patch by xeen

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

Legend:

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

    r1221 r1237  
    2929        LatLon ll2 = mv.getLatLon(100,0);
    3030        double dist = ll1.greatCircleDistance(ll2);
    31         String text = dist > 1000 ? (Math.round(dist/100)/10.0)+" km" : Math.round(dist*10)/10+" m";
     31        String text = dist > 1000 ? Math.round(dist/100)/10 +" km" : (dist >= 1
     32        ? Math.round(dist*10)/10 +" m" : "< 1 m");
    3233        Rectangle2D bound = g.getFontMetrics().getStringBounds(text, g);
    3334        g.setColor(getColor());
     
    3839        g.drawLine(24, 3, 24, 7);
    3940        g.drawLine(74, 3, 74, 7);
    40         g.drawString(text, (int)(50-bound.getWidth()/2), 23);
     41        g.drawString(text, (int)(100-bound.getWidth()), 23);
     42        g.drawString("0", 0, 23);
    4143    }
    4244
  • trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java

    r1230 r1237  
    8686        final JLabel minimize = new JLabel(ImageProvider.get("misc", "normal"));
    8787        titleBar.add(minimize);
    88        
     88
    8989        // scale down the dialog icon
    9090        ImageIcon inIcon = ImageProvider.get("dialogs", iconName);
     
    109109                    }
    110110                }
    111                
     111
    112112                Main.pref.put(action.prefname+".minimized", !nowVisible);
    113113                if(nowVisible == true) {
Note: See TracChangeset for help on using the changeset viewer.