feat(menubar): 实现紧凑独立双列与按内容定高
This commit is contained in:
@@ -32,7 +32,7 @@ struct PanelWindowObserver: NSViewRepresentable {
|
||||
let frame = (window.screen ?? NSScreen.main)?.visibleFrame ?? NSRect(x: 0, y: 0, width: 1000, height: 760)
|
||||
let chrome = CGSize(width: max(0, window.frame.width - window.contentLayoutRect.width),
|
||||
height: max(0, window.frame.height - window.contentLayoutRect.height))
|
||||
let maximum = PanelLayout.contentSize(visible: frame, chrome: chrome)
|
||||
let maximum = PanelLayout.contentSize(visible: frame, chrome: chrome, preferredHeight: PanelLayout.maximumHeight)
|
||||
let size = CGSize(width: min(maximum.width, window.contentLayoutRect.width),
|
||||
height: min(maximum.height, window.contentLayoutRect.height))
|
||||
DispatchQueue.main.async { [weak self, weak window] in
|
||||
|
||||
Reference in New Issue
Block a user