Normalize window controls and confirm close panel
This commit is contained in:
parent
ba68dc3637
commit
004a353fe5
7 changed files with 109 additions and 31 deletions
|
|
@ -11,6 +11,7 @@ final class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCent
|
|||
private var workspaceObserver: NSObjectProtocol?
|
||||
private let updateController = UpdateController()
|
||||
private lazy var titlebarAccessoryController = UpdateTitlebarAccessoryController(viewModel: updateViewModel)
|
||||
private let windowDecorationsController = WindowDecorationsController()
|
||||
|
||||
var updateViewModel: UpdateViewModel {
|
||||
updateController.viewModel
|
||||
|
|
@ -31,6 +32,7 @@ final class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCent
|
|||
configureUserNotifications()
|
||||
updateController.startUpdater()
|
||||
titlebarAccessoryController.start()
|
||||
windowDecorationsController.start()
|
||||
#if DEBUG
|
||||
UpdateTestSupport.applyIfNeeded(to: updateController.viewModel)
|
||||
if ProcessInfo.processInfo.environment["CMUX_UI_TEST_TRIGGER_UPDATE_CHECK"] == "1" {
|
||||
|
|
@ -133,6 +135,10 @@ final class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCent
|
|||
titlebarAccessoryController.attach(to: window)
|
||||
}
|
||||
|
||||
func applyWindowDecorations(to window: NSWindow) {
|
||||
windowDecorationsController.apply(to: window)
|
||||
}
|
||||
|
||||
func toggleNotificationsPopover(animated: Bool = true) {
|
||||
titlebarAccessoryController.toggleNotificationsPopover(animated: animated)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue