mirror of
https://github.com/Lakr233/vphone-cli.git
synced 2026-04-05 13:09:06 +08:00
Persist window position per VM using ECID as frame autosave name
This commit is contained in:
@@ -40,7 +40,13 @@ class VPhoneWindowController: NSObject, NSToolbarDelegate {
|
||||
window.title = "VPHONE ⏳"
|
||||
window.subtitle = ecid ?? ""
|
||||
window.contentView = vmView
|
||||
window.center()
|
||||
if let ecid {
|
||||
if !window.setFrameAutosaveName("vphone-\(ecid)") {
|
||||
window.center()
|
||||
}
|
||||
} else {
|
||||
window.center()
|
||||
}
|
||||
|
||||
// Toolbar with unified style for two-line title
|
||||
let toolbar = NSToolbar(identifier: "vphone-toolbar")
|
||||
|
||||
Reference in New Issue
Block a user