Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/jamf/PPPC-Utility into fe…
Browse files Browse the repository at this point in the history
…ature/signing-mobileconfig
  • Loading branch information
adku committed Sep 3, 2019
2 parents 7d1dac4 + 08e8b27 commit d3d0278
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion Source/View Controllers/TCCProfileViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -234,12 +234,29 @@ class TCCProfileViewController: NSViewController {
}

private func setupStackViewsWithBackground(stackViews: [NSStackView]) {
let darkModeEnabled = isDarkModeEnabled()

for stackView in stackViews {
stackView.wantsLayer = true
stackView.layer?.backgroundColor = NSColor(red: 0.955, green: 0.96, blue: 0.96, alpha: 1.0).cgColor
if darkModeEnabled {
stackView.layer?.backgroundColor = NSColor(red: 0.157, green: 0.165, blue: 0.173, alpha: 1.0).cgColor
} else {
stackView.layer?.backgroundColor = NSColor(red: 0.955, green: 0.96, blue: 0.96, alpha: 1.0).cgColor
}
}
}

private func isDarkModeEnabled() -> Bool {
var darkModeEnabled = false
if #available(OSX 10.14, *) {
if view.effectiveAppearance.name == .darkAqua {
darkModeEnabled = true
}
}

return darkModeEnabled
}

private func setupDescriptions() {
addressBookHelpButton.setHelpMessage(ProfilesDescriptions.addressBook.rawValue)
photosHelpButton.setHelpMessage(ProfilesDescriptions.photos.rawValue)
Expand Down

0 comments on commit d3d0278

Please sign in to comment.