Repo // Change the initial position of certain windows.

This commit is contained in:
ShikiSuen 2022-12-10 23:00:59 +08:00
parent 3b2ef22c88
commit 2e3549f172
4 changed files with 4 additions and 3 deletions

View File

@ -205,6 +205,7 @@ extension SessionCtl {
} else {
CtlPrefUI.shared.controller.show(preferencePane: SSPreferences.PaneIdentifier(rawValue: "General"))
CtlPrefUI.shared.controller.window?.level = .statusBar
CtlPrefUI.shared.controller.window?.setPosition(vertical: .top, horizontal: .right, padding: 20)
}
NSApp.activate(ignoringOtherApps: true)
}

View File

@ -18,7 +18,7 @@ class CtlAboutWindow: NSWindowController {
static func show() {
if shared == nil { shared = CtlAboutWindow(windowNibName: "frmAboutWindow") }
guard let sharedWindow = shared?.window else { return }
sharedWindow.center()
sharedWindow.setPosition(vertical: .top, horizontal: .left, padding: 20)
sharedWindow.orderFrontRegardless() //
sharedWindow.level = .statusBar
sharedWindow.titlebarAppearsTransparent = true

View File

@ -19,7 +19,7 @@ class CtlClientListMgr: NSWindowController, NSTableViewDelegate, NSTableViewData
static func show() {
if shared == nil { shared = CtlClientListMgr(windowNibName: "frmClientListMgr") }
guard let sharedWindow = shared?.window else { return }
sharedWindow.center()
sharedWindow.setPosition(vertical: .center, horizontal: .right, padding: 20)
sharedWindow.orderFrontRegardless() //
sharedWindow.level = .statusBar
sharedWindow.titlebarAppearsTransparent = true

View File

@ -69,7 +69,7 @@ class CtlPrefWindow: NSWindowController, NSWindowDelegate {
shared = CtlPrefWindow(windowNibName: "frmPrefWindow")
guard let sharedWindow = shared?.window else { return }
sharedWindow.delegate = shared
sharedWindow.center()
sharedWindow.setPosition(vertical: .top, horizontal: .right, padding: 20)
sharedWindow.orderFrontRegardless() //
sharedWindow.level = .statusBar
sharedWindow.titlebarAppearsTransparent = true