Calling App.start(stage) early

Calling super.start early prevents a weird layouting bug
were the button of the window is white.
This could(?) be caused by stage and StartupView having
a different min-size.
This commit is contained in:
CodeSteak 2019-06-12 19:22:52 +02:00
parent f094a68b04
commit a2f5b65e30
1 changed files with 7 additions and 2 deletions

View File

@ -13,6 +13,12 @@ class Main : App(StartupView::class) {
override fun start(stage: Stage) {
// Calling super.start early prevents a weird layouting bug
// were the button of the window is white.
// This could(?) be caused by stage and StartupView having
// a different min-size.
super.start(stage)
stage.minWidth = 1008.00
stage.minHeight = 535.00
stage.width = 1008.00
@ -21,8 +27,7 @@ class Main : App(StartupView::class) {
stage.icons.add(Image("icons/TextureSync_Icon_256x256.png"))
stage.setOnCloseRequest { System.exit(0) }
super.start(stage)
stage.scene.stylesheets.add("/css/Styles.css") // this call must be after the super call
stage.scene.stylesheets.add("/css/Styles.css")
SettingsController.init()
svc.initConnection()