fix: broken preferences window toolbar on macos 11 (closes #914)

This commit is contained in:
Louis Pontoise
2021-04-15 19:25:05 +09:00
committed by lwouis
parent 4e57c13a7e
commit 1539030469
@@ -29,6 +29,8 @@ class PreferencesWindow: NSWindow, NSToolbarDelegate {
private func setupView() {
toolbar = NSToolbar(identifier: "1")
toolbar!.delegate = self
// toolbar breaks with the new default style on macOS 11; we force the classic style (see #914)
if #available(OSX 11, *) { toolbarStyle = .expanded }
toolbar!.displayMode = .iconAndLabel
toolbar!.showsBaselineSeparator = true
[