Open SpaceXC opened 1 year ago
related issue https://github.com/JetBrains/compose-jb/issues/877
Thanks for answering, but I would like to add more margin like chrome, currently the toolbar is too close to the window edge. Also, how can I implement this on Windows?
@SpaceXC You can do this by adding addComponentListener
Window(onCloseRequest = ::exitApplication,
undecorated = true) {
window.addComponentListener(object : java.awt.event.ComponentAdapter() {
override fun componentResized(e: java.awt.event.ComponentEvent?) {
window.shape = RoundRectangle2D.Double(
0.0,
0.0,
window.width.toDouble(),
window.height.toDouble(),
30.0,
30.0
)
}
})
App()
}
@guiyanakuang thanks! I'll try that out!
I don't want the white bar on the top of the window, so I set
undecorated
totrue
and add a customized close and minimize button to the top of the window. But I want my window to be round-cornered and I want to add the system-followed close and minimize button like thisHow can I do that? Thanks a lot (XD