diff --git a/Client/Extensions/AppearanceExtensions.swift b/Client/Extensions/AppearanceExtensions.swift index 241ba77fedc..90be26c0c03 100644 --- a/Client/Extensions/AppearanceExtensions.swift +++ b/Client/Extensions/AppearanceExtensions.swift @@ -3,6 +3,7 @@ // file, You can obtain one at http://mozilla.org/MPL/2.0/. import Foundation +import BraveShared extension Theme { func applyAppearanceProperties() { @@ -64,6 +65,15 @@ extension Theme { } else { // iOS 12 fixes, many styling items do not work properly in iOS 12 UILabel.appearance().appearanceTextColor = colors.tints.home + + // iOS 12 does not allow in-line color overrides :/ + // These UI components are currently non-themed + // AlertPopupView + UILabel.appearance(whenContainedInInstancesOf: [AlertPopupView.self]).appearanceTextColor = BraveUX.GreyJ + UIButton.appearance(whenContainedInInstancesOf: [AlertPopupView.self]).tintColor = .white + + // EmptyPrivateTabsView + UILabel.appearance(whenContainedInInstancesOf: [EmptyPrivateTabsView.self]).appearanceTextColor = UIColor.Photon.Grey10 } } } diff --git a/Client/Frontend/Browser/BackForwardListViewController.swift b/Client/Frontend/Browser/BackForwardListViewController.swift index 6bd1be90348..e5ca82d669a 100644 --- a/Client/Frontend/Browser/BackForwardListViewController.swift +++ b/Client/Frontend/Browser/BackForwardListViewController.swift @@ -31,7 +31,7 @@ class BackForwardListViewController: UIViewController, UITableViewDataSource, UI tableView.alwaysBounceVertical = false tableView.register(BackForwardTableViewCell.self, forCellReuseIdentifier: self.BackForwardListCellIdentifier) tableView.backgroundColor = BackForwardViewUX.BackgroundColor - let blurEffect = UIBlurEffect(style: .extraLight) + let blurEffect = UIBlurEffect(style: .regular) let blurEffectView = UIVisualEffectView(effect: blurEffect) tableView.backgroundView = blurEffectView diff --git a/Client/Frontend/Browser/Onboarding/OnboardingSearchEnginesView.swift b/Client/Frontend/Browser/Onboarding/OnboardingSearchEnginesView.swift index 010a96eb433..ffa79c97426 100644 --- a/Client/Frontend/Browser/Onboarding/OnboardingSearchEnginesView.swift +++ b/Client/Frontend/Browser/Onboarding/OnboardingSearchEnginesView.swift @@ -60,6 +60,7 @@ extension OnboardingSearchEnginesViewController { } private let titleStackView = UIStackView().then { stackView in + stackView.spacing = 10 stackView.axis = .vertical } diff --git a/Client/Frontend/Browser/Onboarding/OnboardingSearchEnginesViewController.swift b/Client/Frontend/Browser/Onboarding/OnboardingSearchEnginesViewController.swift index 7f977b97269..1390ee7eea1 100644 --- a/Client/Frontend/Browser/Onboarding/OnboardingSearchEnginesViewController.swift +++ b/Client/Frontend/Browser/Onboarding/OnboardingSearchEnginesViewController.swift @@ -98,7 +98,8 @@ extension OnboardingSearchEnginesViewController: UITableViewDataSource { cell.searchEngineName = searchEngine.shortName cell.searchEngineImage = searchEngine.image - cell.selectedBackgroundColor = theme.colors.accent + cell.selectedBackgroundColor = dark ? UIColor(rgb: 0x495057) : UIColor(rgb: 0xF0F2FF) + cell.backgroundColor = .clear if searchEngine == defaultEngine { tableView.selectRow(at: indexPath, animated: true, scrollPosition: .middle) diff --git a/Client/Frontend/Browser/Onboarding/OnboardingViewController.swift b/Client/Frontend/Browser/Onboarding/OnboardingViewController.swift index 87e5b47838c..2923f9bf032 100644 --- a/Client/Frontend/Browser/Onboarding/OnboardingViewController.swift +++ b/Client/Frontend/Browser/Onboarding/OnboardingViewController.swift @@ -12,6 +12,12 @@ class OnboardingViewController: UIViewController { var profile: Profile let theme: Theme + /// Whether the on-boarding is dark or not, based solely on passed in theme + /// Added explicitly to make removal easier in the future if just `theme` is used + var dark: Bool { + return theme.isDark + } + init(profile: Profile, theme: Theme) { self.profile = profile self.theme = theme @@ -23,7 +29,7 @@ class OnboardingViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() - view.backgroundColor = theme.colors.home + view.backgroundColor = dark ? UIColor(rgb: 0x212529) : UIColor(rgb: 0xFFFFFF) } /// Default behavior to present next onboarding screen. diff --git a/Client/Frontend/Browser/TabTrayController.swift b/Client/Frontend/Browser/TabTrayController.swift index 53522b487f4..c0047e65449 100644 --- a/Client/Frontend/Browser/TabTrayController.swift +++ b/Client/Frontend/Browser/TabTrayController.swift @@ -963,7 +963,8 @@ private struct EmptyPrivateTabsViewUX { } // View we display when there are no private tabs created -fileprivate class EmptyPrivateTabsView: UIView { +// Need access for iOS 12 appearance adjustments +/*fileprivate*/ class EmptyPrivateTabsView: UIView { let scrollView = UIScrollView().then { $0.alwaysBounceVertical = true