Skip to content

Commit

Permalink
Update AppDelegate.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
ShlomoCode authored Aug 11, 2024
1 parent 23bb31a commit d033f5c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions DockDoor/logic/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import SwiftUI

class SettingsWindowControllerDelegate: NSObject, NSWindowDelegate {
func windowDidBecomeKey(_: Notification) {
NSApp.setActivationPolicy(.regular) // Show dock icon on open settings window
NSApp.setActivationPolicy( .regular) // Show dock icon on open settings window
}

func windowWillClose(_: Notification) {
Expand All @@ -36,6 +36,8 @@ class AppDelegate: NSObject, NSApplicationDelegate {
private lazy var settingsWindowController = SettingsWindowController(
panes: [
GeneralSettingsViewController(),


AppearanceSettingsViewController(),
WindowSwitcherSettingsViewController(),
PermissionsSettingsViewController(),
Expand All @@ -50,7 +52,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
super.init()

if let zoomButton = settingsWindowController.window?.standardWindowButton(.zoomButton) {
zoomButton.isEnabled = false
zoomButton.isEnabled = false
}

settingsWindowController.window?.delegate = settingsWindowControllerDelegate
Expand All @@ -59,7 +61,8 @@ class AppDelegate: NSObject, NSApplicationDelegate {
func applicationDidFinishLaunching(_: Notification) {
NSApplication.shared.setActivationPolicy(.accessory) // Hide the menubar and dock icons

if Defaults[.showMenuBarIcon] {
if Defaults[.showMenuBarIcon]
{
setupMenuBar()
} else {
removeMenuBar()
Expand Down

0 comments on commit d033f5c

Please sign in to comment.