From fa943d69e0f20fa7e1e7355ff19b9d76450a58bc Mon Sep 17 00:00:00 2001 From: Serhiy Mytrovtsiy Date: Thu, 4 Jul 2019 10:39:27 +0200 Subject: [PATCH 1/2] fixed labelForChart initialized value --- Stats/AppDelegate.swift | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Stats/AppDelegate.swift b/Stats/AppDelegate.swift index e74afeab..713ee36b 100755 --- a/Stats/AppDelegate.swift +++ b/Stats/AppDelegate.swift @@ -15,7 +15,7 @@ extension Notification.Name { let modules: Observable<[Module]> = Observable([CPU(), Memory(), Disk(), Battery(), Network()]) let colors: Observable = Observable(true) -let labelForChart: Observable = Observable(false) +let labelForChart: Observable = Observable(true) let updater = macAppUpdater(user: "exelban", repo: "stats") @@ -65,6 +65,11 @@ class AppDelegate: NSObject, NSApplicationDelegate { self.defaults.set(true, forKey: "runAtLogin") } + if defaults.object(forKey: "labelForChart") == nil { + self.defaults.set(true, forKey: "labelForChart") + labelForChart << true + } + if isRunning { DistributedNotificationCenter.default().post(name: .killLauncher, object: Bundle.main.bundleIdentifier!) } From 826f1bde091604ab6a5424c5ac2dc8116cd1b4b4 Mon Sep 17 00:00:00 2001 From: Serhiy Mytrovtsiy Date: Thu, 4 Jul 2019 11:30:16 +0200 Subject: [PATCH 2/2] fixed update and about window in dark mode --- README.md | 1 + Stats/AppDelegate.swift | 7 ++----- Stats/Supporting Files/About.storyboard | 4 ++-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 0b5c4bbb..0b822f90 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,7 @@ You can download latest version [here](https://github.com/exelban/stats/releases ## What's new ### v1.2.2 + - fixed update and about visibility window in dark mode - added name of the indicators in the Chart/Chart with value - added check for new version on start - removed charts and charts with value to Disk module diff --git a/Stats/AppDelegate.swift b/Stats/AppDelegate.swift index 713ee36b..29c74897 100755 --- a/Stats/AppDelegate.swift +++ b/Stats/AppDelegate.swift @@ -102,9 +102,7 @@ class AboutVC: NSViewController { override func awakeFromNib() { if self.view.layer != nil { - self.view.window?.backgroundColor = .white - self.view.layer?.backgroundColor = .white - + self.view.window?.backgroundColor = .windowBackgroundColor let versionNumber = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as! String versionLabel.stringValue = "Version \(versionNumber)" } @@ -161,8 +159,7 @@ class UpdatesVC: NSViewController { override func awakeFromNib() { if self.view.layer != nil { - self.view.window?.backgroundColor = .white - self.view.layer?.backgroundColor = .white + self.view.window?.backgroundColor = .windowBackgroundColor } } diff --git a/Stats/Supporting Files/About.storyboard b/Stats/Supporting Files/About.storyboard index 4f811814..27b3fca6 100644 --- a/Stats/Supporting Files/About.storyboard +++ b/Stats/Supporting Files/About.storyboard @@ -59,8 +59,8 @@ - - + +