- Timestamp:
- 2009-11-27T20:34:35+01:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/download/SlippyMapChooser.java
r2519 r2520 238 238 */ 239 239 public void resizeSlippyMap() { 240 int w, h; 241 242 // retrieve the size of the display 240 243 Dimension iScreenSize = Toolkit.getDefaultToolkit().getScreenSize(); 244 241 245 // enlarge 242 246 if(iDownloadDialogDimension == null) { 247 // make the each dimension 90% of the absolute display size 248 w = iScreenSize.width * 90 / 100; 249 h = iScreenSize.height * 90 / 100; 243 250 iDownloadDialogDimension = iGui.getSize(); 244 // make the each dimension 90% of the absolute display size and245 // center the DownloadDialog246 // retrieve the size of the display247 int w = iScreenSize.width * 90 / 100;248 int h = iScreenSize.height * 90 / 100;249 iGui.setBounds((iScreenSize.width - w) / 2, (iScreenSize.height - h) / 2, w, h);250 251 } 251 252 // shrink 252 253 else { 253 // set the size back to the initial dimensions and center the 254 // DownloadDialog 255 int w = iDownloadDialogDimension.width; 256 int h = iDownloadDialogDimension.height; 257 iGui.setBounds((iScreenSize.width - w) / 2, (iScreenSize.height - h) / 2, w, h); 254 // set the size back to the initial dimensions 255 w = iDownloadDialogDimension.width; 256 h = iDownloadDialogDimension.height; 258 257 iDownloadDialogDimension = null; 259 258 } 259 260 // resize and center the DownloadDialog 261 iGui.setBounds((iScreenSize.width - w) / 2, (iScreenSize.height - h) / 2, w, h); 260 262 261 263 repaint();
Note:
See TracChangeset
for help on using the changeset viewer.