Make FramePanel take into account title width
This commit is contained in:
parent
59200b2baa
commit
06e2a97cfc
@ -279,6 +279,11 @@ open class FramePanel<out S : Screen>(
|
||||
|
||||
protected val tabs: ArrayList<FramePanel<*>.AbstractTab> = ArrayList()
|
||||
|
||||
override fun sizeToContents() {
|
||||
super.sizeToContents()
|
||||
width = maxOf(width, dockPaddingLeft + dockPaddingRight + (helpButton?.width ?: 0f) + (closeButton?.width ?: 0f) + (title?.let { font.width(it).toFloat() } ?: 0f))
|
||||
}
|
||||
|
||||
override fun performLayout() {
|
||||
for ((i, tab) in tabs.withIndex()) {
|
||||
tab.setPos(i * 28f, -28f)
|
||||
|
Loading…
Reference in New Issue
Block a user