Problems with Kotlin UI DSL
I am trying to use Kotlin UI DSL and I am running into issues.
It seems to me that JetBrains recommends to use this DSL for all UI work. However, it seems that some very basic things are not only impossible using the standard components, they are impossible in general.
I want to create a toolbar with height of 16. Unfortunately, I am unable to do it because there is a gap after each row, including the last one.
I figured out what is the reason. `panel` method runs the following code:
internal fun createLayoutBuilder(): LayoutBuilder {
return LayoutBuilder(MigLayoutBuilder(createIntelliJSpacingConfiguration()))
}
Where `createIntelliJSpacingConfiguration` has the following line:
override val verticalGap = JBUI.scale(6 * 2)
It seems to me that there is no way to change it. I just cannot access it.
Reducing the size of the resulting panel doesn't help too. I just get the bottom part of the panel, while the top part is cut. However, it doesn't look like a proper solution even if it worked.
So my questions are:
1. Is it possible to solve my problem? Maybe I am missing something.
2. If currently it is indeed not possible, then why? Is it a bug in the UI DSL? Am I trying to solve my problem with a wrong tool?
Please sign in to leave a comment.
Kotlin UI DSL is suited for Forms-like UI. Could you show sketch of what you're trying to build?
Hello,
I might have the same problem.
I create several pane using Kotlin UI DSL, and I have some gap at the end. I add some color to the border to see it. we can see a gap between all and that not the behavior I attempt.
any idea ? :/
Please provide your code and clear description on screenshot "expected vs actual"