diff --git a/Aural.xcodeproj/project.pbxproj b/Aural.xcodeproj/project.pbxproj index 5315555dd..a188e474f 100644 --- a/Aural.xcodeproj/project.pbxproj +++ b/Aural.xcodeproj/project.pbxproj @@ -4827,9 +4827,9 @@ 3E9792E226A24EFF0010BE99 /* AppModeController.swift */, 3E9E590125DB6B150064EB5F /* ModularAppModeController.swift */, 3E7638AE2857DA3F00461F4D /* UnifiedAppModeController.swift */, + 3EBFF5A42B52C0670056D5B4 /* CompactAppModeController.swift */, 3E9E58FF25DB6B150064EB5F /* MenuBarAppModeController.swift */, 3E4322742687C96E009E8ADB /* WidgetAppModeController.swift */, - 3EBFF5A42B52C0670056D5B4 /* CompactAppModeController.swift */, 3E62979926A3CD3800C96AB8 /* Destroyable.swift */, 3E62979C26A3CEBF00C96AB8 /* Restorable.swift */, ); diff --git a/Aural.xcodeproj/project.xcworkspace/xcuserdata/kven.xcuserdatad/UserInterfaceState.xcuserstate b/Aural.xcodeproj/project.xcworkspace/xcuserdata/kven.xcuserdatad/UserInterfaceState.xcuserstate index 336b8586c..166919945 100644 Binary files a/Aural.xcodeproj/project.xcworkspace/xcuserdata/kven.xcuserdatad/UserInterfaceState.xcuserstate and b/Aural.xcodeproj/project.xcworkspace/xcuserdata/kven.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/Source/UI/AppModeManagement/CompactAppModeController.swift b/Source/UI/AppModeManagement/CompactAppModeController.swift index 131fadd1c..c90391aa0 100644 --- a/Source/UI/AppModeManagement/CompactAppModeController.swift +++ b/Source/UI/AppModeManagement/CompactAppModeController.swift @@ -81,7 +81,7 @@ class CompactAppModeController: AppModeController { NSApp.menu = appDelegate.mainMenu windowController = CompactPlayerWindowController() - windowController?.showWindow(self) + windowController?.theWindow.showCenteredOnScreen() // Build Library if not already built or building // Always give it a low priority (not user-interactive through any UI components). diff --git a/Source/UI/AppModeManagement/UnifiedAppModeController.swift b/Source/UI/AppModeManagement/UnifiedAppModeController.swift index 9a2dcc8cc..b48b8c16b 100644 --- a/Source/UI/AppModeManagement/UnifiedAppModeController.swift +++ b/Source/UI/AppModeManagement/UnifiedAppModeController.swift @@ -84,7 +84,7 @@ class UnifiedAppModeController: AppModeController { windowController?.window?.setFrame(frame, display: true) } - windowController?.showWindow(self) + windowController?.theWindow.showCenteredOnScreen() reactivateApp(previousMode: previousMode) diff --git a/Source/UI/AppSetup/ThemeSetup/ThemeSetup.xib b/Source/UI/AppSetup/ThemeSetup/ThemeSetup.xib index 3b52aa929..60fedd4db 100644 --- a/Source/UI/AppSetup/ThemeSetup/ThemeSetup.xib +++ b/Source/UI/AppSetup/ThemeSetup/ThemeSetup.xib @@ -118,40 +118,10 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -160,37 +130,10 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/Source/UI/AppSetup/ThemeSetup/ThemeSetupViewController.swift b/Source/UI/AppSetup/ThemeSetup/ThemeSetupViewController.swift index 943f46588..c6d308077 100644 --- a/Source/UI/AppSetup/ThemeSetup/ThemeSetupViewController.swift +++ b/Source/UI/AppSetup/ThemeSetup/ThemeSetupViewController.swift @@ -22,6 +22,18 @@ class ThemeSetupViewController: NSViewController { override func viewDidLoad() { super.viewDidLoad() + + btnFontScheme.menu?.removeAllItems() + + for scheme in FontScheme.allSystemDefinedSchemes { + btnFontScheme.menu?.addItem(withTitle: scheme.name) + } + + btnColorScheme.menu?.removeAllItems() + + for scheme in ColorScheme.allSystemDefinedSchemes { + btnColorScheme.menu?.addItem(withTitle: scheme.name) + } let fontSchemeName = appSetup.fontSchemePreset.name let colorSchemeName = appSetup.colorSchemePreset.name @@ -37,12 +49,10 @@ class ThemeSetupViewController: NSViewController { guard let selSchemeName = btnColorScheme.titleOfSelectedItem, let scheme = colorSchemesManager.systemDefinedObject(named: selSchemeName), - let colorSchemePreset = ColorSchemePreset.presetByName(selSchemeName) else {return} + let preset = ColorSchemePreset.presetByName(selSchemeName) else {return} previewView.colorScheme = scheme - - appSetup.colorSchemePreset = colorSchemePreset - print("Set color scheme to: \(appSetup.colorSchemePreset.rawValue)") + appSetup.colorSchemePreset = preset } @IBAction func fontSchemeSelectionAction(_ sender: Any) { @@ -52,8 +62,6 @@ class ThemeSetupViewController: NSViewController { let preset = FontSchemePreset.presetByName(selSchemeName) else {return} previewView.fontScheme = scheme - appSetup.fontSchemePreset = preset - print("Set font scheme to: \(appSetup.fontSchemePreset.rawValue)") } } diff --git a/Source/UI/ColorSchemes/Domain/ColorScheme+Presets.swift b/Source/UI/ColorSchemes/Domain/ColorScheme+Presets.swift index a6457a3b0..9bcb5e73e 100644 --- a/Source/UI/ColorSchemes/Domain/ColorScheme+Presets.swift +++ b/Source/UI/ColorSchemes/Domain/ColorScheme+Presets.swift @@ -179,5 +179,5 @@ extension ColorScheme { inactiveControlColor: .white50Percent, suppressedControlColor: .white25Percent) - static let allPresets: [ColorScheme] = [.lava, .blackAqua, .blackGreen, .grayRed, .whiteBlight, .gloomyDay, .brownie, .poolsideFM] + static let allSystemDefinedSchemes: [ColorScheme] = [.lava, .blackAqua, .blackGreen, .grayRed, .whiteBlight, .gloomyDay, .brownie, .poolsideFM] } diff --git a/Source/UI/ColorSchemes/Manager/ColorSchemesManager.swift b/Source/UI/ColorSchemes/Manager/ColorSchemesManager.swift index a56c7cacf..e6d6e2786 100644 --- a/Source/UI/ColorSchemes/Manager/ColorSchemesManager.swift +++ b/Source/UI/ColorSchemes/Manager/ColorSchemesManager.swift @@ -27,7 +27,7 @@ class ColorSchemesManager: UserManagedObjects { init(persistentState: ColorSchemesPersistentState?) { - let systemDefinedSchemes: [ColorScheme] = ColorScheme.allPresets + let systemDefinedSchemes: [ColorScheme] = ColorScheme.allSystemDefinedSchemes let userDefinedSchemes = (persistentState?.userSchemes ?? []).map {ColorScheme($0, false)} if let persistentSystemScheme = persistentState?.systemScheme {