Commit 20e44f2b authored by Jose Blaya's avatar Jose Blaya
Browse files

Update Theme colors

parent 6c24c792
This diff is collapsed.
......@@ -152,8 +152,8 @@ class AboutLicenseCell: UITableViewCell, Restylable {
// MARK: Restylable
func viewShouldRestyle() {
Theme.current.applySolidLightBackground(self)
Theme.current.applyLightBackground(textLicense)
Theme.current.applyLightBackground(self)
Theme.current.applySolidLightBackground(textLicense)
buttonName.style(style: TextStyle.textStyle9)
Theme.current.applySmallInfo(labelCopyright, appearance: .dark)
Theme.current.applyBody1Monospace(textLicense, appearance: .dark)
......
......@@ -110,11 +110,11 @@ class AboutViewController: AutolayoutViewController {
styleNavigationBarWithTitle(L10n.Menu.Item.about)
// XXX: for some reason, UITableView is not affected by appearance updates
if let viewContainer = viewContainer {
Theme.current.applyLightBackground(view)
Theme.current.applyLightBackground(viewContainer)
Theme.current.applySolidLightBackground(view)
Theme.current.applySolidLightBackground(viewContainer)
}
Theme.current.applyLightBackground(tableView)
Theme.current.applySolidLightBackground(tableView)
Theme.current.applySubtitle(labelIntro)
}
}
......
......@@ -80,7 +80,7 @@ class CustomDNSSettingsViewController: AutolayoutViewController {
super.viewShouldRestyle()
if let viewContainer = viewContainer {
Theme.current.applyLightBackground(viewContainer)
Theme.current.applySolidLightBackground(viewContainer)
}
for label in [labelPrimaryDNS!, labelSecondaryDNS!] {
......
......@@ -344,8 +344,8 @@ class DashboardViewController: AutolayoutViewController {
super.viewShouldRestyle()
navigationItem.titleView = NavigationLogoView()
Theme.current.applyLightBackground(view)
Theme.current.applyLightBackground(viewContainer!)
Theme.current.applySolidLightBackground(view)
Theme.current.applySolidLightBackground(viewContainer!)
Theme.current.applyLightNavigationBar(navigationController!.navigationBar)
......
......@@ -46,7 +46,7 @@ class ExpirationCell: UITableViewCell, Restylable {
let backgroundView = UIView()
self.backgroundView = backgroundView
Theme.current.applyLightBackground(self)
Theme.current.applySolidLightBackground(self)
Theme.current.applyWarningMenuBackground(backgroundView)
Theme.current.applyMenuCaption(labelWarning)
Theme.current.applyMenuSmallCaption(labelUpgrade)
......
......@@ -230,12 +230,12 @@ class RegionsViewController: AutolayoutViewController {
styleNavigationBarWithTitle(L10n.Menu.Item.region)
if let viewContainer = viewContainer {
Theme.current.applyLightBackground(view)
Theme.current.applyLightBackground(viewContainer)
Theme.current.applySolidLightBackground(view)
Theme.current.applySolidLightBackground(viewContainer)
}
searchController.view.backgroundColor = .clear
Theme.current.applyLightBackground(tableView)
Theme.current.applySolidLightBackground(tableView)
Theme.current.applyDividerToSeparator(tableView)
Theme.current.applySearchBarStyle(searchController.searchBar)
......
......@@ -577,10 +577,10 @@ class SettingsViewController: AutolayoutViewController {
styleNavigationBarWithTitle(L10n.Menu.Item.settings)
// XXX: for some reason, UITableView is not affected by appearance updates
if let viewContainer = viewContainer {
Theme.current.applyLightBackground(view)
Theme.current.applyLightBackground(viewContainer)
Theme.current.applySolidLightBackground(view)
Theme.current.applySolidLightBackground(viewContainer)
}
Theme.current.applyLightBackground(tableView)
Theme.current.applySolidLightBackground(tableView)
Theme.current.applyDividerToSeparator(tableView)
tableView.reloadData()
......@@ -815,7 +815,7 @@ extension SettingsViewController: UITableViewDataSource, UITableViewDelegate {
cell.detailTextLabel?.text = nil
}
Theme.current.applySolidLightBackground(cell)
Theme.current.applyLightBackground(cell)
if let textLabel = cell.textLabel {
Theme.current.applySettingsCellTitle(textLabel,
appearance: .dark)
......@@ -1108,7 +1108,7 @@ extension SettingsViewController: OptionsViewControllerDelegate {
backgroundView.backgroundColor = Theme.current.palette.lightBackground
cell.selectedBackgroundView = backgroundView
Theme.current.applySolidLightBackground(cell)
Theme.current.applyLightBackground(cell)
Theme.current.applyDetailTableCell(cell)
}
......
......@@ -110,6 +110,12 @@ extension Theme {
TextStyle.textStyle6 : TextStyle.textStyle7)
}
public func applyClearTextfield(_ textfield: UITextField) {
textfield.style(style: palette.appearance == .dark ?
TextStyle.textStyle6 : TextStyle.textStyle7)
textfield.backgroundColor = .clear
}
//MARK: SearchBar
public func applySearchBarStyle(_ searchBar: UISearchBar) {
......
......@@ -20,10 +20,10 @@ extension Theme.Palette {
palette.textfieldButtonBackgroundColor = UIColor.black
palette.navigationBarBackIcon = Asset.Piax.Global.iconBack.image
palette.brandBackground = lightPalette.brandBackground
palette.lightBackground = .piaGrey6
palette.lightBackground = .piaGrey7
palette.subtitleColor = .piaGrey8
palette.lineColor = .white
palette.solidLightBackground = .piaGrey7
palette.solidLightBackground = .piaGrey6
palette.emphasis = lightPalette.emphasis
palette.accent1 = lightPalette.accent1
palette.accent2 = lightPalette.accent2
......
......@@ -57,7 +57,7 @@ class IPTile: UIView, Tileable {
vpnIpTitle.style(style: TextStyle.textStyle21)
Theme.current.applySubtitle(localIpValue)
Theme.current.applySettingsCellTitle(vpnIpValue, appearance: .dark)
Theme.current.applyLightBackground(self)
Theme.current.applySolidLightBackground(self)
}
@objc private func updateCurrentIP() {
......
......@@ -48,7 +48,7 @@ class QuickConnectTile: UIView, Tileable {
@objc private func viewShouldRestyle() {
tileTitle.style(style: TextStyle.textStyle21)
Theme.current.applyLightBackground(self)
Theme.current.applySolidLightBackground(self)
}
@objc private func updateQuickConnectList() {
......
......@@ -85,8 +85,8 @@ class VPNPermissionViewController: AutolayoutViewController {
override func viewShouldRestyle() {
super.viewShouldRestyle()
Theme.current.applyLightBackground(view)
Theme.current.applyLightBackground(viewContainer!)
Theme.current.applySolidLightBackground(view)
Theme.current.applySolidLightBackground(viewContainer!)
Theme.current.applySubtitle(labelMessage)
Theme.current.applySubtitle(labelFooter)
Theme.current.applyTitle(labelTitle, appearance: .dark)
......
......@@ -139,7 +139,7 @@ class WalkthroughViewController: AutolayoutViewController {
override func viewShouldRestyle() {
super.viewShouldRestyle()
Theme.current.applyLightBackground(view)
Theme.current.applySolidLightBackground(view)
Theme.current.applyScrollableMap(scrollBackground)
Theme.current.applyButtonLabelStyle(buttonSkip)
Theme.current.applyButtonLabelStyle(buttonNext)
......
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