edvin / tornadofx

Lightweight JavaFX Framework for Kotlin
Apache License 2.0
3.67k stars 269 forks source link

Set window icons for Alerts #1350

Open Hely0n opened 2 years ago

Hely0n commented 2 years ago

Setting icons in the JavaFX way, they won't be set. So the following expression isn't effective when using TornadoFX: (alert.dialogPane.scene.window as Stage).icons += (Image(getResStream("/desktop/images/dialog-warning.png")))

Is there another way to achieve this? The "alert()" builder from TornadoFX seems to create the same Alert object as the Alert() constructor, so there are no functions like openModal() available, which would return a Stage in which icons could be added.