Comply with iOS 13 Dark Mode

Fixes #93
This commit is contained in:
Davide De Rosa 2019-09-02 19:51:21 +02:00
parent db3cde3aae
commit 95f5ae8733
2 changed files with 15 additions and 14 deletions

View File

@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Chinese (Simplified) translations (OnlyThen). [#95](https://github.com/passepartoutvpn/passepartout-ios/pull/95)
- Support for iOS 13 Dark Mode. [#93](https://github.com/passepartoutvpn/passepartout-ios/issues/93)
### Fixed

View File

@ -34,25 +34,25 @@ struct Theme {
var accent1 = UIColor(rgb: 0xd69c68, alpha: 1.0)
var primaryText: UIColor = .darkText
// var primaryText: UIColor = .darkText
// TODO: uncomment for iOS 13 Dark Mode
// var primaryText: UIColor = {
// guard #available(iOS 13, *) else {
// return .darkText
// }
// return .label
// }()
var primaryText: UIColor = {
guard #available(iOS 13, *) else {
return .darkText
}
return .label
}()
var primaryLightText: UIColor = .white
var secondaryText: UIColor = .gray
// var secondaryText: UIColor = .gray
// TODO: uncomment for iOS 13 Dark Mode
// var secondaryText: UIColor = {
// guard #available(iOS 13, *) else {
// return .gray
// }
// return .secondaryLabel
// }()
var secondaryText: UIColor = {
guard #available(iOS 13, *) else {
return .gray
}
return .secondaryLabel
}()
var on: UIColor {
return accent1