mirror of
https://github.com/VGEAREN/Stockbar.git
synced 2026-10-06 14:33:11 +08:00
fix(ui): force panel relayout when switching between list/settings
MenuBarExtra(.window) caches the NSPanel size from list mode (~720 with many stocks) and does not auto-shrink when switching to the 480-tall settings view, leaving a large blank gap. Adding .id(showSettings) tells SwiftUI to rebuild the view subtree on mode change, prompting the panel to recompute its size from the new content. release: 1.3.3 → 1.3.4
This commit is contained in:
@@ -105,5 +105,6 @@ struct DropdownView: View {
|
||||
.frame(width: 320)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.background(Color(nsColor: .windowBackgroundColor))
|
||||
.id(showSettings)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user