Fix window y centering

This commit is contained in:
crschnick 2024-05-17 12:46:53 +00:00
parent 374a98d22d
commit c05d945694

View file

@ -51,7 +51,7 @@ public class AppWindowHelper {
stage.yProperty().addListener((observable, oldValue, newValue) -> {
var n = newValue.doubleValue();
var o = oldValue.doubleValue();
if (stage.isShowing() && areNumbersValid(o, n) && n == 0.0 && o != 0.0 && Math.abs(n - o) > 100) {
if (stage.isShowing() && areNumbersValid(o, n) && n == 0.0 && o != 0.0 && Math.abs(n - o) > 20) {
stage.setY(o);
}
});