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:
vgearen
2026-05-14 11:12:45 +08:00
parent 8c424dbe59
commit bb00d4379f
2 changed files with 5 additions and 4 deletions
+1
View File
@@ -105,5 +105,6 @@ struct DropdownView: View {
.frame(width: 320)
.fixedSize(horizontal: false, vertical: true)
.background(Color(nsColor: .windowBackgroundColor))
.id(showSettings)
}
}