Commit ad146dea authored by Jose Blaya's avatar Jose Blaya
Browse files

Fix text color in About view for Dark Mode

parent 56165469
...@@ -37,8 +37,9 @@ class AboutNoticeCell: UITableViewCell, Restylable { ...@@ -37,8 +37,9 @@ class AboutNoticeCell: UITableViewCell, Restylable {
func viewShouldRestyle() { func viewShouldRestyle() {
Theme.current.applySecondaryBackground(self) Theme.current.applySecondaryBackground(self)
buttonName.style(style: TextStyle.textStyle9) buttonName.style(style: TextStyle.textStyle9)
Theme.current.applySmallInfo(labelCopyright, appearance: .dark) Theme.current.applySubtitle(labelCopyright)
Theme.current.applySmallInfo(labelNotice, appearance: .dark) Theme.current.applySubtitle(labelNotice)
} }
} }
...@@ -155,8 +156,8 @@ class AboutLicenseCell: UITableViewCell, Restylable { ...@@ -155,8 +156,8 @@ class AboutLicenseCell: UITableViewCell, Restylable {
Theme.current.applySecondaryBackground(self) Theme.current.applySecondaryBackground(self)
Theme.current.applyPrincipalBackground(textLicense) Theme.current.applyPrincipalBackground(textLicense)
buttonName.style(style: TextStyle.textStyle9) buttonName.style(style: TextStyle.textStyle9)
Theme.current.applySmallInfo(labelCopyright, appearance: .dark) Theme.current.applySubtitle(labelCopyright)
Theme.current.applyBody1Monospace(textLicense, appearance: .dark) Theme.current.applyLicenseMonospaceFontAndColor(textLicense, appearance: .dark)
buttonMore.tintColor = textLicense.textColor buttonMore.tintColor = textLicense.textColor
gradientLicense?.removeFromSuperview() gradientLicense?.removeFromSuperview()
......
...@@ -94,7 +94,7 @@ class AboutViewController: AutolayoutViewController { ...@@ -94,7 +94,7 @@ class AboutViewController: AutolayoutViewController {
DispatchQueue.main.async { DispatchQueue.main.async {
self.licenseByComponentName[component.name] = license self.licenseByComponentName[component.name] = license
guard let index = self.components.licenses.index(of: component) else { guard let index = self.components.licenses.firstIndex(of: component) else {
return return
} }
self.tableView.reloadRows(at: [IndexPath(row: index, section: 1)], with: .none) self.tableView.reloadRows(at: [IndexPath(row: index, section: 1)], with: .none)
......
...@@ -184,4 +184,12 @@ extension Theme { ...@@ -184,4 +184,12 @@ extension Theme {
Asset.Piax.Global.eyeInactiveLight.image Asset.Piax.Global.eyeInactiveLight.image
} }
public func applyLicenseMonospaceFontAndColor(_ textView: UITextView,
appearance: Appearance) {
textView.font = typeface.monospaceFont(size: 14.0)
textView.textColor = palette.appearance == .dark ?
.white :
palette.textColor(forRelevance: 2, appearance: appearance)
}
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment