Changeset 1237 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2009-01-11T00:17:01+01:00 (16 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/MapScaler.java
r1221 r1237 29 29 LatLon ll2 = mv.getLatLon(100,0); 30 30 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"); 32 33 Rectangle2D bound = g.getFontMetrics().getStringBounds(text, g); 33 34 g.setColor(getColor()); … … 38 39 g.drawLine(24, 3, 24, 7); 39 40 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); 41 43 } 42 44 -
trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java
r1230 r1237 86 86 final JLabel minimize = new JLabel(ImageProvider.get("misc", "normal")); 87 87 titleBar.add(minimize); 88 88 89 89 // scale down the dialog icon 90 90 ImageIcon inIcon = ImageProvider.get("dialogs", iconName); … … 109 109 } 110 110 } 111 111 112 112 Main.pref.put(action.prefname+".minimized", !nowVisible); 113 113 if(nowVisible == true) {
Note:
See TracChangeset
for help on using the changeset viewer.