better default image sizes

this rounding to 10 thing wasn't great, and the images were also a bit bigger than they needed to be.
This commit is contained in:
Justin Kunimune 2023-12-18 15:05:14 -08:00
parent dcaa087cf9
commit c44b7763c5

View File

@ -42,7 +42,7 @@ import static java.lang.Math.sqrt;
public class MapConfigurationDialog extends Dialog<Boolean> { public class MapConfigurationDialog extends Dialog<Boolean> {
public final int MIN_SIZE = 5, MAX_SIZE = 30000; public final int MIN_SIZE = 5, MAX_SIZE = 30000;
public final double DEF_SIZE = 1500; public final double DEF_SIZE = 1200;
private final double defaultRatio; private final double defaultRatio;
@ -66,7 +66,7 @@ public class MapConfigurationDialog extends Dialog<Boolean> {
this.widthBox.setMaxWidth(Double.MAX_VALUE); this.widthBox.setMaxWidth(Double.MAX_VALUE);
this.heightBox = new Spinner<Integer>(MIN_SIZE, MAX_SIZE, this.heightBox = new Spinner<Integer>(MIN_SIZE, MAX_SIZE,
10*(int)round(this.widthBox.getValue()/defaultRatio/10)); (int)round(this.widthBox.getValue()/defaultRatio));
this.heightBox.setEditable(true); this.heightBox.setEditable(true);
this.widthBox.setMaxWidth(Double.MAX_VALUE); this.widthBox.setMaxWidth(Double.MAX_VALUE);