Don't decide whenever widen device controls panel before parent properly determines its dimensions
This commit is contained in:
parent
6105328e85
commit
1f9719ceab
@ -353,8 +353,10 @@ class DeviceControls<out S : MatteryScreen<*>>(
|
||||
var totalWidth = 0f
|
||||
var totalHeight = 0f
|
||||
|
||||
val parent = parent!!
|
||||
|
||||
for (button in buttons) {
|
||||
if (y != 0f && button.height + y > parent!!.height) {
|
||||
if (y != 0f && button.height + y > parent.height && (parent.dock == Dock.NONE || !parent.layoutInvalidated)) {
|
||||
totalHeight = totalHeight.coerceAtLeast(y - 2f)
|
||||
y = 0f
|
||||
x += currentWidth + 2f
|
||||
|
Loading…
Reference in New Issue
Block a user