hi, i have another problem for some reason MenuBar...
# compose-desktop
z
hi, i have another problem for some reason MenuBar won't display properly on Linux. The windows build displays it fine though The submenus also are really thin, only showing a small bit of the Item. I'm not able to screenshot them
Copy code
application {
            val windowState = rememberWindowState()

            Window(
                title = "tau",
                icon = painterResource("window-icon.svg"),
                onCloseRequest = ::exitApplication,
                state = windowState
            ) {
                LaunchedEffect(Unit) {
                    window.minimumSize = Dimension(300, 400)
                }

                MenuBar {
                    Menu("File", mnemonic = 'F') {
                        Item(
                            text = "Copy",
                            onClick = {
                                listOf(selectedFile.toFile()).copyToClipboard()
                            },
                            shortcut = KeyShortcut(Key.C, ctrl = true)
                        )

                        Item(
                            text = "Cut",
                            onClick = {

                            },
                            shortcut = KeyShortcut(Key.X, ctrl = true)
                        )

                        Item(
                            text = "Delete",
                            onClick = {

                            },
                            shortcut = KeyShortcut(Key.Delete)
                        )
                    }

                    Menu("Settings", mnemonic = 'S') {
                        Menu("Theme", mnemonic = 'T') {
                            ThemeCheckboxItem("Dark", mnemonic = 'D')
                            ThemeCheckboxItem("Light", mnemonic = 'L')
                        }
                    }
                }
            }
        }
👍 1
m
I'm still learning how to use Compose, but your coding looks good to me. Maybe you could try to set a look and feel for Linux. You can add under "application {": UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()) Maybe this will change something?