Changeset 5142 in josm
- Timestamp:
- 2012-03-31T16:55:32+02:00 (13 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/Main.java
r5138 r5142 514 514 geometry = WindowGeometry.mainWindow("gui.geometry", 515 515 (args.containsKey("geometry") ? args.get("geometry").iterator().next() : null), 516 !args.containsKey("no-maximize") );516 !args.containsKey("no-maximize") && Main.pref.getBoolean("gui.maximized", false)); 517 517 } 518 518 -
trunk/src/org/openstreetmap/josm/tools/WindowGeometry.java
r5015 r5142 182 182 return new WindowGeometry(new Point(x,y), new Dimension(w,h)); 183 183 } else { 184 System.out.println(tr("Ignoring malformed geometry: {0}", arg));184 Main.warn(tr("Ignoring malformed geometry: {0}", arg)); 185 185 } 186 186 } 187 187 WindowGeometry def; 188 if(maximize) 188 if(maximize) { 189 189 def = new WindowGeometry(screenDimension); 190 else 191 def = new WindowGeometry(screenDimension.getLocation(), new Dimension(1000, 740)); 190 } else { 191 Point p = screenDimension.getLocation(); 192 p.x += (screenDimension.width-1000)/2; 193 p.y += (screenDimension.height-740)/2; 194 def = new WindowGeometry(p, new Dimension(1000, 740)); 195 } 192 196 return new WindowGeometry(preferenceKey, def); 193 197 } … … 315 319 for (int i = 0; i < gc.length; i++) { 316 320 Rectangle b = gc[i].getBounds(); 317 Rectangle is = b.intersection(g); 318 int s = is.width*is.height; 319 if(bounds == null || intersect < s) { 320 intersect = s; 321 bounds = b; 321 if(b.width/b.height >= 3) /* multiscreen with wrong definition */ 322 { 323 b.width /= 2; 324 Rectangle is = b.intersection(g); 325 int s = is.width*is.height; 326 if(bounds == null || intersect < s) { 327 intersect = s; 328 bounds = b; 329 } 330 b = new Rectangle(b); 331 b.x += b.width; 332 is = b.intersection(g); 333 s = is.width*is.height; 334 if(bounds == null || intersect < s) { 335 intersect = s; 336 bounds = b; 337 } 338 } 339 else 340 { 341 Rectangle is = b.intersection(g); 342 int s = is.width*is.height; 343 if(bounds == null || intersect < s) { 344 intersect = s; 345 bounds = b; 346 } 322 347 } 323 348 }
Note:
See TracChangeset
for help on using the changeset viewer.