fix: using wrong color issue

This commit is contained in:
CMK 2021-06-22 20:52:30 +08:00
parent a07104053c
commit af42540ee7
34 changed files with 73 additions and 191 deletions

View File

@ -9,7 +9,7 @@ import UIKit
import CoreData
enum SettingsItem: Hashable {
case apperance(settingObjectID: NSManagedObjectID)
case appearance(settingObjectID: NSManagedObjectID)
case notification(settingObjectID: NSManagedObjectID, switchMode: NotificationSwitchMode)
case boringZone(item: Link)
case spicyZone(item: Link)
@ -56,8 +56,8 @@ extension SettingsItem {
var textColor: UIColor {
switch self {
case .termsOfService: return .systemBlue
case .privacyPolicy: return .systemBlue
case .termsOfService: return Asset.Colors.brandBlue.color
case .privacyPolicy: return Asset.Colors.brandBlue.color
case .clearMediaCache: return .systemRed
case .signOut: return .systemRed
}

View File

@ -91,7 +91,7 @@ extension PollSection {
cell.pollOptionView.optionPercentageLabel.isHidden = false
cell.pollOptionView.optionPercentageLabel.text = String(Int(100 * percentage)) + "%"
cell.pollOptionView.voteProgressStripView.isHidden = false
cell.pollOptionView.voteProgressStripView.tintColor = voted ? Asset.Colors.Background.Poll.highlight.color : Asset.Colors.Background.Poll.disabled.color
cell.pollOptionView.voteProgressStripView.tintColor = voted ? Asset.Colors.brandBlue.color : Asset.Colors.Background.Poll.disabled.color
cell.pollOptionView.voteProgressStripView.setProgress(CGFloat(percentage), animated: animated)
}
}

View File

@ -25,9 +25,9 @@ extension ActiveLabel {
numberOfLines = 0
lineSpacing = 5
mentionColor = Asset.Colors.Label.highlight.color
hashtagColor = Asset.Colors.Label.highlight.color
URLColor = Asset.Colors.Label.highlight.color
mentionColor = Asset.Colors.brandBlue.color
hashtagColor = Asset.Colors.brandBlue.color
URLColor = Asset.Colors.brandBlue.color
emojiPlaceholderColor = .systemFill
#if DEBUG
text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."

View File

@ -33,7 +33,7 @@ extension UITableView {
let backgroundColor = cell.backgroundColor
UIView.animate(withDuration: 0.3) {
cell.backgroundColor = Asset.Colors.Label.highlight.color.withAlphaComponent(0.5)
cell.backgroundColor = Asset.Colors.brandBlue.color.withAlphaComponent(0.5)
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
UIView.animate(withDuration: 0.3) {
cell.backgroundColor = backgroundColor

View File

@ -32,12 +32,8 @@ internal enum Asset {
}
internal enum Colors {
internal enum Background {
internal enum AudioPlayer {
internal static let highlight = ColorAsset(name: "Colors/Background/AudioPlayer/highlight")
}
internal enum Poll {
internal static let disabled = ColorAsset(name: "Colors/Background/Poll/disabled")
internal static let highlight = ColorAsset(name: "Colors/Background/Poll/highlight")
}
internal static let alertYellow = ColorAsset(name: "Colors/Background/alert.yellow")
internal static let dangerBorder = ColorAsset(name: "Colors/Background/danger.border")
@ -61,13 +57,11 @@ internal enum Asset {
internal static let actionToolbar = ColorAsset(name: "Colors/Button/action.toolbar")
internal static let disabled = ColorAsset(name: "Colors/Button/disabled")
internal static let inactive = ColorAsset(name: "Colors/Button/inactive")
internal static let normal = ColorAsset(name: "Colors/Button/normal")
}
internal enum Icon {
internal static let plus = ColorAsset(name: "Colors/Icon/plus")
}
internal enum Label {
internal static let highlight = ColorAsset(name: "Colors/Label/highlight")
internal static let primary = ColorAsset(name: "Colors/Label/primary")
internal static let secondary = ColorAsset(name: "Colors/Label/secondary")
internal static let tertiary = ColorAsset(name: "Colors/Label/tertiary")
@ -85,7 +79,6 @@ internal enum Asset {
}
internal enum TextField {
internal static let background = ColorAsset(name: "Colors/TextField/background")
internal static let highlight = ColorAsset(name: "Colors/TextField/highlight")
internal static let invalid = ColorAsset(name: "Colors/TextField/invalid")
internal static let valid = ColorAsset(name: "Colors/TextField/valid")
}

View File

@ -1,9 +0,0 @@
{
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"provides-namespace" : true
}
}

View File

@ -1,20 +0,0 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.851",
"green" : "0.565",
"red" : "0.169"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@ -1,20 +0,0 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.851",
"green" : "0.565",
"red" : "0.169"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@ -1,38 +0,0 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xD9",
"green" : "0x90",
"red" : "0x2B"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xFF",
"green" : "0x84",
"red" : "0x0A"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@ -1,20 +0,0 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "217",
"green" : "144",
"red" : "43"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@ -1,20 +0,0 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "217",
"green" : "144",
"red" : "43"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@ -32,7 +32,7 @@ final class AutoCompleteTableViewCell: UITableViewCell {
let titleLabel: UILabel = {
let label = UILabel()
label.font = UIFontMetrics(forTextStyle: .headline).scaledFont(for: .systemFont(ofSize: 17, weight: .semibold), maximumPointSize: 22)
label.textColor = Asset.Colors.Label.highlight.color
label.textColor = Asset.Colors.brandBlue.color
label.text = "Title"
return label
}()

View File

@ -23,7 +23,7 @@ final class ComposeStatusPollExpiresOptionCollectionViewCell: UICollectionViewCe
button.titleLabel?.font = UIFontMetrics(forTextStyle: .body).scaledFont(for: .systemFont(ofSize: 12))
button.expandEdgeInsets = UIEdgeInsets(top: 0, left: -10, bottom: -20, right: -20)
button.setTitle(L10n.Scene.Compose.Poll.durationTime(L10n.Scene.Compose.Poll.thirtyMinutes), for: .normal)
button.setTitleColor(Asset.Colors.Button.normal.color, for: .normal)
button.setTitleColor(Asset.Colors.brandBlue.color, for: .normal)
return button
}()

View File

@ -30,7 +30,7 @@ final class ComposeStatusPollOptionAppendEntryCollectionViewCell: UICollectionVi
override var isHighlighted: Bool {
didSet {
pollOptionView.roundedBackgroundView.backgroundColor = isHighlighted ? Asset.Colors.Background.tertiarySystemBackground.color : Asset.Colors.Background.secondarySystemBackground.color
pollOptionView.plusCircleImageView.tintColor = isHighlighted ? Asset.Colors.Button.normal.color.withAlphaComponent(0.5) : Asset.Colors.Button.normal.color
pollOptionView.plusCircleImageView.tintColor = isHighlighted ? Asset.Colors.brandBlue.color.withAlphaComponent(0.5) : Asset.Colors.brandBlue.color
}
}

View File

@ -29,8 +29,8 @@ final class ComposeViewController: UIViewController, NeedsDependency {
let button = RoundedEdgesButton(type: .custom)
button.setTitle(L10n.Scene.Compose.composeAction, for: .normal)
button.titleLabel?.font = .systemFont(ofSize: 14, weight: .bold)
button.setBackgroundImage(.placeholder(color: Asset.Colors.Button.normal.color), for: .normal)
button.setBackgroundImage(.placeholder(color: Asset.Colors.Button.normal.color.withAlphaComponent(0.5)), for: .highlighted)
button.setBackgroundImage(.placeholder(color: Asset.Colors.brandBlue.color), for: .normal)
button.setBackgroundImage(.placeholder(color: Asset.Colors.brandBlue.color.withAlphaComponent(0.5)), for: .highlighted)
button.setBackgroundImage(.placeholder(color: Asset.Colors.Button.disabled.color), for: .disabled)
button.setTitleColor(.white, for: .normal)
button.contentEdgeInsets = UIEdgeInsets(top: 6, left: 16, bottom: 5, right: 16) // set 28pt height
@ -711,7 +711,7 @@ extension ComposeViewController: TextEditorViewTextAttributesDelegate {
for match in highlightMatches {
// set highlight
var attributes = [NSAttributedString.Key: Any]()
attributes[.foregroundColor] = Asset.Colors.Label.highlight.color
attributes[.foregroundColor] = Asset.Colors.brandBlue.color
// See `traitCollectionDidChange(_:)`
// set accessibility
@ -780,7 +780,7 @@ extension ComposeViewController: TextEditorViewTextAttributesDelegate {
// set highlight
var attributes = [NSAttributedString.Key: Any]()
attributes[.foregroundColor] = Asset.Colors.Label.highlight.color
attributes[.foregroundColor] = Asset.Colors.brandBlue.color
// See `traitCollectionDidChange(_:)`
// set accessibility

View File

@ -225,7 +225,7 @@ extension ComposeToolbarView {
extension ComposeToolbarView {
private static func configureToolbarButtonAppearance(button: UIButton) {
button.tintColor = Asset.Colors.Button.normal.color
button.tintColor = Asset.Colors.brandBlue.color
button.setBackgroundImage(.placeholder(size: ComposeToolbarView.toolbarButtonSize, color: .systemFill), for: .highlighted)
button.layer.masksToBounds = true
button.layer.cornerRadius = 5

View File

@ -106,7 +106,7 @@ extension HomeTimelineNavigationBarTitleView {
configureButton(
title: L10n.Scene.HomeTimeline.NavigationBarState.newPosts,
textColor: .white,
backgroundColor: Asset.Colors.Button.normal.color
backgroundColor: Asset.Colors.brandBlue.color
)
button.isHidden = false
case .offlineButton:

View File

@ -713,7 +713,7 @@ extension MastodonRegisterViewController: UITextFieldDelegate {
private func setTextFieldValidAppearance(_ textField: UITextField, validateState: MastodonRegisterViewModel.ValidateState) {
switch validateState {
case .empty:
showShadowWithColor(color: textField.isFirstResponder ? Asset.Colors.TextField.highlight.color : .clear, textField: textField)
showShadowWithColor(color: textField.isFirstResponder ? Asset.Colors.brandBlue.color : .clear, textField: textField)
case .valid:
showShadowWithColor(color: Asset.Colors.TextField.valid.color, textField: textField)
case .invalid:

View File

@ -175,15 +175,19 @@ extension MastodonServerRulesViewController {
}
func configTextView() {
let linkColor = Asset.Colors.Button.normal.color
let str = NSString(string: L10n.Scene.ServerRules.prompt(viewModel.domain))
let termsOfServiceRange = str.range(of: L10n.Scene.ServerRules.termsOfService)
let privacyRange = str.range(of: L10n.Scene.ServerRules.privacyPolicy)
let attributeString = NSMutableAttributedString(string: L10n.Scene.ServerRules.prompt(viewModel.domain), attributes: [NSAttributedString.Key.font: UIFontMetrics(forTextStyle: .body).scaledFont(for: .systemFont(ofSize: 17, weight: .regular), maximumPointSize: 22), NSAttributedString.Key.foregroundColor: UIColor.label])
let attributeString = NSMutableAttributedString(
string: L10n.Scene.ServerRules.prompt(viewModel.domain),
attributes: [
NSAttributedString.Key.font: UIFontMetrics(forTextStyle: .body).scaledFont(for: .systemFont(ofSize: 17, weight: .regular), maximumPointSize: 22),
NSAttributedString.Key.foregroundColor: UIColor.label
]
)
attributeString.addAttribute(.link, value: Mastodon.API.serverRulesURL(domain: viewModel.domain), range: termsOfServiceRange)
attributeString.addAttribute(.link, value: Mastodon.API.privacyURL(domain: viewModel.domain), range: privacyRange)
let linkAttributes = [NSAttributedString.Key.foregroundColor:linkColor]
let linkAttributes = [NSAttributedString.Key.foregroundColor: Asset.Colors.brandBlue.color]
bottomPromptTextView.attributedText = attributeString
bottomPromptTextView.linkTextAttributes = linkAttributes
bottomPromptTextView.delegate = self

View File

@ -41,7 +41,7 @@ final class WelcomeViewController: UIViewController, NeedsDependency {
let backgroundImageHighlightedColor: UIColor = traitCollection.userInterfaceIdiom == .phone ? UIColor(white: 0.8, alpha: 1.0) : Asset.Colors.brandBlueDarken20.color
button.setBackgroundImage(.placeholder(color: backgroundImageColor), for: .normal)
button.setBackgroundImage(.placeholder(color: backgroundImageHighlightedColor), for: .highlighted)
let titleColor: UIColor = traitCollection.userInterfaceIdiom == .phone ? Asset.Colors.Button.normal.color : UIColor.white
let titleColor: UIColor = traitCollection.userInterfaceIdiom == .phone ? Asset.Colors.brandBlue.color : UIColor.white
button.setTitleColor(titleColor, for: .normal)
button.translatesAutoresizingMaskIntoConstraints = false
return button
@ -51,7 +51,7 @@ final class WelcomeViewController: UIViewController, NeedsDependency {
let button = UIButton(type: .system)
button.titleLabel?.font = UIFontMetrics(forTextStyle: .headline).scaledFont(for: .systemFont(ofSize: 15, weight: .semibold))
button.setTitle(L10n.Common.Controls.Actions.signIn, for: .normal)
let titleColor: UIColor = traitCollection.userInterfaceIdiom == .phone ? UIColor.white.withAlphaComponent(0.8) : Asset.Colors.Button.normal.color
let titleColor: UIColor = traitCollection.userInterfaceIdiom == .phone ? UIColor.white.withAlphaComponent(0.8) : Asset.Colors.brandBlue.color
button.setTitleColor(titleColor, for: .normal)
button.translatesAutoresizingMaskIntoConstraints = false
return button

View File

@ -395,21 +395,21 @@ extension ProfileViewModel {
var backgroundColor: UIColor {
guard let highPriorityAction = self.highPriorityAction(except: []) else {
assertionFailure()
return Asset.Colors.Button.normal.color
return Asset.Colors.brandBlue.color
}
switch highPriorityAction {
case .none: return Asset.Colors.Button.normal.color
case .follow: return Asset.Colors.Button.normal.color
case .reqeust: return Asset.Colors.Button.normal.color
case .pending: return Asset.Colors.Button.normal.color
case .following: return Asset.Colors.Button.normal.color
case .none: return Asset.Colors.brandBlue.color
case .follow: return Asset.Colors.brandBlue.color
case .reqeust: return Asset.Colors.brandBlue.color
case .pending: return Asset.Colors.brandBlue.color
case .following: return Asset.Colors.brandBlue.color
case .muting: return Asset.Colors.Background.alertYellow.color
case .blocked: return Asset.Colors.Button.normal.color
case .blocked: return Asset.Colors.brandBlue.color
case .blocking: return Asset.Colors.Background.danger.color
case .suspended: return Asset.Colors.Button.normal.color
case .edit: return Asset.Colors.Button.normal.color
case .editing: return Asset.Colors.Button.normal.color
case .updating: return Asset.Colors.Button.normal.color
case .suspended: return Asset.Colors.brandBlue.color
case .edit: return Asset.Colors.brandBlue.color
case .editing: return Asset.Colors.brandBlue.color
case .updating: return Asset.Colors.brandBlue.color
}
}

View File

@ -241,7 +241,7 @@ class ReportViewController: UIViewController, NeedsDependency {
= UIBarButtonItem(barButtonSystemItem: UIBarButtonItem.SystemItem.cancel,
target: self,
action: #selector(doneButtonDidClick))
navigationItem.rightBarButtonItem?.tintColor = Asset.Colors.Label.highlight.color
navigationItem.rightBarButtonItem?.tintColor = Asset.Colors.brandBlue.color
// fetch old mastodon user
let beReportedUser: MastodonUser? = {

View File

@ -76,7 +76,7 @@ final class ReportedStatusTableViewCell: UITableViewCell, StatusCell {
super.setHighlighted(highlighted, animated: animated)
if highlighted {
checkbox.image = UIImage(systemName: "checkmark.circle.fill")
checkbox.tintColor = Asset.Colors.Label.highlight.color
checkbox.tintColor = Asset.Colors.brandBlue.color
} else if !isSelected {
checkbox.image = UIImage(systemName: "circle")
checkbox.tintColor = Asset.Colors.Label.secondary.color

View File

@ -328,7 +328,7 @@ extension SettingsViewController: UITableViewDelegate {
guard let item = dataSource.itemIdentifier(for: indexPath) else { return }
switch item {
case .apperance:
case .appearance:
// do nothing
break
case .notification:
@ -399,7 +399,7 @@ extension SettingsViewController: SettingsAppearanceTableViewCellDelegate {
guard let dataSource = viewModel.dataSource else { return }
guard let indexPath = tableView.indexPath(for: cell) else { return }
let item = dataSource.itemIdentifier(for: indexPath)
guard case let .apperance(settingObjectID) = item else { return }
guard case let .appearance(settingObjectID) = item else { return }
context.managedObjectContext.performChanges {
let setting = self.context.managedObjectContext.object(with: settingObjectID) as! Setting

View File

@ -71,7 +71,7 @@ extension SettingsViewModel {
var snapshot = NSDiffableDataSourceSnapshot<SettingsSection, SettingsItem>()
// appearance
let appearanceItems = [SettingsItem.apperance(settingObjectID: setting.objectID)]
let appearanceItems = [SettingsItem.appearance(settingObjectID: setting.objectID)]
snapshot.appendSections([.apperance])
snapshot.appendItems(appearanceItems, toSection: .apperance)
@ -123,7 +123,7 @@ extension SettingsViewModel {
guard let self = self else { return nil }
switch item {
case .apperance(let objectID):
case .appearance(let objectID):
let cell = tableView.dequeueReusableCell(withIdentifier: String(describing: SettingsAppearanceTableViewCell.self), for: indexPath) as! SettingsAppearanceTableViewCell
self.context.managedObjectContext.performAndWait {
let setting = self.context.managedObjectContext.object(with: objectID) as! Setting

View File

@ -48,7 +48,7 @@ class AppearanceView: UIView {
didSet {
checkBox.isSelected = selected
if selected {
checkBox.imageView?.tintColor = Asset.Colors.Label.highlight.color
checkBox.imageView?.tintColor = Asset.Colors.brandBlue.color
} else {
checkBox.imageView?.tintColor = Asset.Colors.Label.secondary.color
}

View File

@ -38,10 +38,20 @@ extension PrimaryActionButton {
private func _init() {
titleLabel?.font = UIFontMetrics(forTextStyle: .headline).scaledFont(for: .systemFont(ofSize: 17, weight: .semibold))
setTitleColor(.white, for: .normal)
setupBackgroundAppearance()
applyCornerRadius(radius: 10)
}
func setupBackgroundAppearance() {
setBackgroundImage(UIImage.placeholder(color: Asset.Colors.brandBlue.color), for: .normal)
setBackgroundImage(UIImage.placeholder(color: Asset.Colors.brandBlueDarken20.color), for: .highlighted)
setBackgroundImage(UIImage.placeholder(color: Asset.Colors.disabled.color), for: .disabled)
applyCornerRadius(radius: 10)
}
override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
super.traitCollectionDidChange(previousTraitCollection)
setupBackgroundAppearance()
}
func showLoading() {

View File

@ -22,7 +22,7 @@ final class AudioContainerView: UIView {
stackView.isLayoutMarginsRelativeArrangement = true
stackView.layer.cornerRadius = AudioContainerView.cornerRadius
stackView.clipsToBounds = true
stackView.backgroundColor = Asset.Colors.Background.AudioPlayer.highlight.color
stackView.backgroundColor = Asset.Colors.brandBlue.color
stackView.translatesAutoresizingMaskIntoConstraints = false
return stackView
}()
@ -31,7 +31,7 @@ final class AudioContainerView: UIView {
let view = UIView()
view.layer.cornerRadius = 16
view.clipsToBounds = true
view.backgroundColor = Asset.Colors.Background.AudioPlayer.highlight.color
view.backgroundColor = Asset.Colors.brandBlue.color
view.translatesAutoresizingMaskIntoConstraints = false
return view
}()

View File

@ -21,7 +21,7 @@ final class PollOptionView: UIView {
let roundedBackgroundView = UIView()
let voteProgressStripView: StripProgressView = {
let view = StripProgressView()
view.tintColor = Asset.Colors.Background.Poll.highlight.color
view.tintColor = Asset.Colors.brandBlue.color
return view
}()
@ -35,7 +35,7 @@ final class PollOptionView: UIView {
let imageView = UIImageView()
let image = UIImage(systemName: "checkmark", withConfiguration: UIImage.SymbolConfiguration(pointSize: 14, weight: .bold))!
imageView.image = image.withRenderingMode(.alwaysTemplate)
imageView.tintColor = Asset.Colors.Button.normal.color
imageView.tintColor = Asset.Colors.brandBlue.color
return imageView
}()
@ -43,7 +43,7 @@ final class PollOptionView: UIView {
let imageView = UIImageView()
let image = Asset.Circles.plusCircle.image
imageView.image = image.withRenderingMode(.alwaysTemplate)
imageView.tintColor = Asset.Colors.Button.normal.color
imageView.tintColor = Asset.Colors.brandBlue.color
return imageView
}()

View File

@ -126,7 +126,7 @@ final class StatusView: UIView {
let revealContentWarningButton: UIButton = {
let button = HighlightDimmableButton()
button.setImage(UIImage(systemName: "eye", withConfiguration: UIImage.SymbolConfiguration(pointSize: 17, weight: .medium)), for: .normal)
button.tintColor = Asset.Colors.Button.normal.color
button.tintColor = Asset.Colors.brandBlue.color
return button
}()
@ -175,8 +175,8 @@ final class StatusView: UIView {
let button = HitTestExpandedButton()
button.titleLabel?.font = UIFontMetrics(forTextStyle: .body).scaledFont(for: .systemFont(ofSize: 14, weight: .semibold))
button.setTitle(L10n.Common.Controls.Status.Poll.vote, for: .normal)
button.setTitleColor(Asset.Colors.Button.normal.color, for: .normal)
button.setTitleColor(Asset.Colors.Button.normal.color.withAlphaComponent(0.8), for: .highlighted)
button.setTitleColor(Asset.Colors.brandBlue.color, for: .normal)
button.setTitleColor(Asset.Colors.brandBlue.color.withAlphaComponent(0.8), for: .highlighted)
button.setTitleColor(Asset.Colors.Button.disabled.color, for: .disabled)
button.isEnabled = false
return button

View File

@ -20,8 +20,8 @@ final class ThreadMetaView: UIView {
let button = UIButton()
button.titleLabel?.font = UIFontMetrics(forTextStyle: .headline).scaledFont(for: .systemFont(ofSize: 15, weight: .semibold))
button.setTitle("0 reblog", for: .normal)
button.setTitleColor(Asset.Colors.Button.normal.color, for: .normal)
button.setTitleColor(Asset.Colors.Button.normal.color.withAlphaComponent(0.5), for: .highlighted)
button.setTitleColor(Asset.Colors.brandBlue.color, for: .normal)
button.setTitleColor(Asset.Colors.brandBlue.color.withAlphaComponent(0.5), for: .highlighted)
return button
}()
@ -29,8 +29,8 @@ final class ThreadMetaView: UIView {
let button = UIButton()
button.titleLabel?.font = UIFontMetrics(forTextStyle: .headline).scaledFont(for: .systemFont(ofSize: 15, weight: .semibold))
button.setTitle("0 favorite", for: .normal)
button.setTitleColor(Asset.Colors.Button.normal.color, for: .normal)
button.setTitleColor(Asset.Colors.Button.normal.color.withAlphaComponent(0.5), for: .highlighted)
button.setTitleColor(Asset.Colors.brandBlue.color, for: .normal)
button.setTitleColor(Asset.Colors.brandBlue.color.withAlphaComponent(0.5), for: .highlighted)
return button
}()

View File

@ -23,7 +23,7 @@ final class ThreadReplyLoaderTableViewCell: UITableViewCell {
let button = HighlightDimmableButton()
button.titleLabel?.font = TimelineLoaderTableViewCell.labelFont
button.backgroundColor = Asset.Colors.Background.secondaryGroupedSystemBackground.color
button.setTitleColor(Asset.Colors.Button.normal.color, for: .normal)
button.setTitleColor(Asset.Colors.brandBlue.color, for: .normal)
button.setTitle(L10n.Common.Controls.Timeline.Loader.showMoreReplies, for: .normal)
return button
}()

View File

@ -23,7 +23,7 @@ class TimelineLoaderTableViewCell: UITableViewCell {
let button = HighlightDimmableButton()
button.titleLabel?.font = TimelineLoaderTableViewCell.labelFont
button.backgroundColor = Asset.Colors.Background.systemBackground.color
button.setTitleColor(Asset.Colors.Button.normal.color, for: .normal)
button.setTitleColor(Asset.Colors.brandBlue.color, for: .normal)
button.setTitle(L10n.Common.Controls.Timeline.Loader.loadMissingPosts, for: .normal)
button.setTitle("", for: .disabled)
return button

View File

@ -22,6 +22,8 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
let window = UIWindow(windowScene: windowScene)
self.window = window
// set tint color
window.tintColor = Asset.Colors.brandBlue.color
let appContext = AppContext.shared
let sceneCoordinator = SceneCoordinator(scene: scene, sceneDelegate: self, appContext: appContext)