Browse Source

Fixes ahoy!

pull/92/head
Abhishek 4 years ago
parent
commit
c3d8925009
  1. 7
      Clocker/AppDelegate.swift
  2. 2
      Clocker/Clocker.xcodeproj/xcuserdata/ban.xcuserdatad/xcschemes/xcschememanagement.plist
  3. 2
      Clocker/Media.xcassets/Onboarding/Dark Menubar.imageset/Contents.json
  4. BIN
      Clocker/Media.xcassets/Onboarding/Dark Menubar.imageset/Screen Shot 2020-10-11 at 2.16.37 PM.png
  5. BIN
      Clocker/Media.xcassets/Onboarding/Dark Menubar.imageset/Screen Shot 2020-10-11 at 2.19.26 PM.png
  6. 13
      Clocker/Overall App/AppDefaults.swift
  7. 1
      Clocker/Overall App/Strings.swift
  8. 3
      Clocker/Preferences/Appearance/AppearanceViewController.swift

7
Clocker/AppDelegate.swift

@ -164,12 +164,7 @@ open class AppDelegate: NSObject, NSApplicationDelegate {
let defaults = UserDefaults.standard
let currentActivationPolicy = NSRunningApplication.current.activationPolicy
var activationPolicy: NSApplication.ActivationPolicy = defaults.integer(forKey: CLAppDisplayOptions) == 0 ? .accessory : .regular
#if DEBUG
UserDefaults.standard.set(1, forKey: CLAppDisplayOptions)
activationPolicy = .regular
#endif
let activationPolicy: NSApplication.ActivationPolicy = defaults.integer(forKey: CLAppDisplayOptions) == 0 ? .accessory : .regular
if currentActivationPolicy != activationPolicy {
NSApp.setActivationPolicy(activationPolicy)

2
Clocker/Clocker.xcodeproj/xcuserdata/ban.xcuserdatad/xcschemes/xcschememanagement.plist

@ -17,7 +17,7 @@
<key>Tests.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
<integer>2</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>

2
Clocker/Media.xcassets/Onboarding/Dark Menubar.imageset/Contents.json vendored

@ -5,7 +5,7 @@
"scale" : "1x"
},
{
"filename" : "Screen Shot 2020-10-11 at 2.19.26 PM.png",
"filename" : "Screen Shot 2020-10-11 at 2.16.37 PM.png",
"idiom" : "universal",
"scale" : "2x"
},

BIN
Clocker/Media.xcassets/Onboarding/Dark Menubar.imageset/Screen Shot 2020-10-11 at 2.16.37 PM.png vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
Clocker/Media.xcassets/Onboarding/Dark Menubar.imageset/Screen Shot 2020-10-11 at 2.19.26 PM.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

13
Clocker/Overall App/AppDefaults.swift

@ -67,17 +67,6 @@ class AppDefaults {
if defaults.object(forKey: CLThemeKey) == nil {
Themer.shared().set(theme: 0)
}
// Set default to System theme for Mojave
if #available(macOS 10.14, *) {
if defaults.bool(forKey: CLDefaultThemeOnMojave) == false {
if isDarkModeOn() {
Themer.shared().set(theme: 2)
defaults.set(2, forKey: CLThemeKey)
}
defaults.set(true, forKey: CLDefaultThemeOnMojave)
}
}
}
private class func showCompactModeAlert() {
@ -126,7 +115,7 @@ class AppDefaults {
CLShowMeetingInMenubar: 1,
CLTruncateTextLength: 30,
CLSelectedCalendars: [],
CLAppDisplayOptions: 1,
CLAppDisplayOptions: 0,
CLMenubarCompactMode: 1,
CLDisplayDSTTransitionInfo: 0]
}

1
Clocker/Overall App/Strings.swift

@ -35,6 +35,5 @@ let CLOnboaringTestsLaunchArgument = "isTestingTheOnboardingFlow"
let CLMenubarCompactMode = "com.abhishek.menubarCompactMode"
let CLDefaultMenubarMode = "com.abhishek.shouldDefaultToCompactMode"
let CLInstallHomeIndicatorObject = "installHomeIndicatorObject"
let CLDefaultThemeOnMojave = "com.abhishek.defaultHasBeenSetOnMacOsMojave"
let CLSwitchToCompactModeAlert = "com.abhishek.switchToCompactMode"
let CLDisplayDSTTransitionInfo = "com.abhishek.showDSTTransitionInfo"

3
Clocker/Preferences/Appearance/AppearanceViewController.swift

@ -104,8 +104,9 @@ class AppearanceViewController: ParentViewController {
let shouldDisplayCompact = DataStore.shared().shouldDisplay(.menubarCompactMode)
menubarMode.setSelected(true, forSegment: shouldDisplayCompact ? 0 : 1)
// True is Menubar Only and False is Menubar + Dock
let appDisplayOptions = DataStore.shared().shouldDisplay(.appDisplayOptions)
appDisplayControl.setSelected(true, forSegment: appDisplayOptions ? 1 : 0)
appDisplayControl.setSelected(true, forSegment: appDisplayOptions ? 0 : 1)
}
@IBOutlet var timeFormatLabel: NSTextField!

Loading…
Cancel
Save