-
Notifications
You must be signed in to change notification settings - Fork 448
Fix #3632: Refactor theme logic to use iOS 13 APIs #3606
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love to see these changes.
Leaving random comments about using certain colors in certain places.
One thing we can consider to clean this up further is to replace UIColor.xxx
with just .xxx
in places that allow it.
I assume you did find/replace on BraveUX -> UIColor
that's why some of it left
Client/Frontend/Brave Rewards/Transfer/WalletTransferExpiredViewController.swift
Show resolved
Hide resolved
@@ -75,7 +75,7 @@ class FeedSourceListViewController: UITableViewController { | |||
tableView.estimatedRowHeight = UITableView.automaticDimension | |||
tableView.delegate = self | |||
tableView.dataSource = self | |||
tableView.sectionIndexColor = BraveUX.braveOrange | |||
tableView.sectionIndexColor = UIColor.braveOrange |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UIColor not needed here?
if previous == nil || newTheme != Theme.of(previous) { | ||
applyTheme(newTheme) | ||
} | ||
// FIXME: Theme - Private Mode |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment
@@ -57,7 +57,7 @@ class ButtonToast: Toast { | |||
|
|||
if let imageName = imageName { | |||
let icon = UIImageView(image: UIImage(imageLiteralResourceName: imageName).template) | |||
icon.tintColor = UIColor.Photon.white100 | |||
icon.tintColor = UIColor.white |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UIColor
can be removed
@@ -13,7 +13,6 @@ class SyncCameraView: UIView, AVCaptureMetadataOutputObjectsDelegate { | |||
let button = self.createCameraButton() | |||
button.setTitle(Strings.grantCameraAccess, for: .normal) | |||
button.tintColor = .white | |||
button.appearanceTextColor = .white |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do not set title color here?
textView.textColor = BraveUX.greyJ | ||
textView.backgroundColor = .white | ||
textView.textColor = .braveLabel | ||
textView.backgroundColor = .braveBackground |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has to be checked as well, white -> dynamic change
init(title: String, accessibilityIdentifier: String, callback: @escaping SnackBarCallback) { | ||
self.callback = callback | ||
|
||
super.init(frame: .zero) | ||
|
||
setTitle(title, for: .normal) | ||
titleLabel?.font = DynamicFontHelper.defaultHelper.DefaultMediumFont | ||
setTitleColor(SnackBarUX.highlightText, for: .highlighted) | ||
setTitleColor(SettingsUX.tableViewRowTextColor, for: .normal) | ||
setTitleColor(.braveOrange, for: .highlighted) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
highlightText = UIColor.Photon.blue60
seems to be blue not orange, unless we want to update it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Decided to update it to reflect Brave highlight/tint colors
textLabel.textColor = TwoLineCellUX.textColor | ||
detailTextLabel.textColor = TwoLineCellUX.detailTextColor | ||
textLabel.textColor = .braveLabel | ||
detailTextLabel.textColor = .secondaryBraveLabel | ||
setupDynamicFonts() | ||
|
||
imageView.contentMode = .scaleAspectFill | ||
imageView.layer.cornerRadius = 6 // hmm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔
7850454
to
602a48a
Compare
42cf666
to
d71733f
Compare
9db5b75
to
fae0e48
Compare
Also adjust light divider01 to use 15% black
fae0e48
to
45131a3
Compare
Summary of Changes
Fixes #3632
Theme related bugs affected:
Submitter Checklist:
NSLocalizableString()
Test Plan:
Known Issue: The toolbar that appears above the keyboard when you focus a text box in a web page does not theme correctly. This is true even in the live version of the app, and seems to be an iOS specific bug. Haven't tested to determine which versions of iOS are affected.
Screenshots:
There are many screenshots so they've been zipped into separate folders:
Reviewer Checklist:
QA/(Yes|No)
release-notes/(include|exclude)
bug
/enhancement