Fix sizeToContents not working properly when childrens are not docked
This commit is contained in:
parent
89c7295abb
commit
dd3a08f47d
@ -1404,7 +1404,14 @@ open class EditablePanel<out S : Screen>(
|
||||
|
||||
for (child in visibleChildrenInternal) {
|
||||
when (child.dock) {
|
||||
Dock.NONE, Dock.FILL -> {} // do nothing
|
||||
Dock.NONE -> {
|
||||
width = maxOf(width, child.x + child.width)
|
||||
height = maxOf(height, child.y + child.height)
|
||||
}
|
||||
|
||||
Dock.FILL -> {
|
||||
throw RuntimeException()
|
||||
} // do nothing
|
||||
|
||||
Dock.LEFT, Dock.RIGHT -> {
|
||||
if (previousDock != 1) {
|
||||
|
Loading…
Reference in New Issue
Block a user