Closed the-rene closed 2 years ago
Each time an existing instance of a View is opened as a dialog, it is displayed lower and more to the right then before.
A newly created instance works as excpected and is rendered at the same position each time.
See the code below to reproduce this issue and the gif to show the behavior
import tornadofx.* class MyMainView : View("main") { override val root = buttonbar { minHeight = 50.0 minWidth = 200.0 button("find dialog").action { find<MyDialog>().apply { openModal() } } button("new dialog").action { MyDialog().apply { openModal() } } } } class MyDialog : View("dialog") { override val root = buttonbar { minHeight = 50.0 minWidth = 100.0 button("close").action { close() } } } class MyApp : App(MyMainView::class) fun main() = launch<MyApp>()
Verified, looks like a simple fix. Will work on PR.
I can confirm the PR fixes this.
Thanks a lot for the quick response and fix!
Each time an existing instance of a View is opened as a dialog, it is displayed lower and more to the right then before.
A newly created instance works as excpected and is rendered at the same position each time.
See the code below to reproduce this issue and the gif to show the behavior