mirror of https://github.com/badvision/jace.git
Issue #27: Accounted for titlebar size and fixed 2x aspect incorrect width
This commit is contained in:
parent
deee9a2a72
commit
ad819c5678
|
@ -401,19 +401,25 @@ public class EmulatorUILogic implements Reconfigurable {
|
||||||
if (size > 2) {
|
if (size > 2) {
|
||||||
size = 0;
|
size = 0;
|
||||||
}
|
}
|
||||||
|
int width, height = 0;
|
||||||
switch (size) {
|
switch (size) {
|
||||||
case 0:
|
case 0:
|
||||||
JaceApplication.getApplication().primaryStage.setWidth(560);
|
width = 560;
|
||||||
JaceApplication.getApplication().primaryStage.setHeight(384);
|
height = 384;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
JaceApplication.getApplication().primaryStage.setWidth(840);
|
width = 840;
|
||||||
JaceApplication.getApplication().primaryStage.setHeight(576);
|
height = 576;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
JaceApplication.getApplication().primaryStage.setWidth(1020);
|
width = 1120;
|
||||||
JaceApplication.getApplication().primaryStage.setHeight(768);
|
height = 768;
|
||||||
}
|
}
|
||||||
|
Stage stage = JaceApplication.getApplication().primaryStage;
|
||||||
|
double vgap = stage.getScene().getY();
|
||||||
|
double hgap = stage.getScene().getX();
|
||||||
|
stage.setWidth(hgap*2 + width);
|
||||||
|
stage.setHeight(vgap + height);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue