I would like to change the background of the `Titl...
# jewel
b
I would like to change the background of the
Titlebar
in my standalone CMP desktop app, but I am running into an issue with a large offset on the left side (on macOS). I guess it's intended for reserving space for the menu buttons, but also isn't the right size either.
Copy code
TitleBar {
    Box(
        modifier = Modifier
            .background(Color.LightGray)
            .fillMaxSize()
    )
}
Is this intended behavior? how can this padding on the left side be changed? Or is is it possible to access the value of the padding to offset the background accordingly?
s
I'm not entirely sure as all this was written by @HIGAN quite some time ago, but you can refer to the sample usage in https://github.com/JetBrains/intellij-community/blob/master/platform/jewel/samples[…]lin/org/jetbrains/jewel/samples/standalone/view/TitleBarView.kt and try to figure it out from there I guess? Sorry I don't have much more info on this
One thing that seems relevant and you don't seem to have is that the sample applies
Modifier.newFullscreenControls()
to the
TitleBar
b
Thanks for the pointers, I'll check it out
👍 1
s
Sorry I don't have a more precise answer
Looking into this made me find a minor bug 🙂 https://github.com/JetBrains/intellij-community/pull/3034
I don't think the fullscreen controls should impact what you shared, they are... for fullscreen 🙂