Fix Brand Color (IOS-160) (#1054)

This commit is contained in:
Nathan Mattes 2023-06-02 09:52:12 +02:00 committed by GitHub
parent 4aff4c65c5
commit 8804432b60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
33 changed files with 44 additions and 165 deletions

View File

@ -218,7 +218,6 @@
DB1FD45A25F27898004CFCFC /* CategoryPickerItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB1FD45925F27898004CFCFC /* CategoryPickerItem.swift */; };
DB2B3ABC25E37E15007045F9 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = DB2B3ABE25E37E15007045F9 /* InfoPlist.strings */; };
DB2F073525E8ECF000957B2D /* AuthenticationViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB2F073325E8ECF000957B2D /* AuthenticationViewModel.swift */; };
DB2FF510260B113300ADA9FE /* ComposeStatusPollExpiresOptionCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB2FF50F260B113300ADA9FE /* ComposeStatusPollExpiresOptionCollectionViewCell.swift */; };
DB336F3F278E668C0031E64B /* StatusTableViewCell+ViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB336F3E278E668C0031E64B /* StatusTableViewCell+ViewModel.swift */; };
DB3E6FDD2806A40F00B035AE /* DiscoveryHashtagsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB3E6FDC2806A40F00B035AE /* DiscoveryHashtagsViewController.swift */; };
DB3E6FE02806A4ED00B035AE /* DiscoveryHashtagsViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB3E6FDF2806A4ED00B035AE /* DiscoveryHashtagsViewModel.swift */; };
@ -870,7 +869,6 @@
DB1FD45F25F278AF004CFCFC /* CategoryPickerSection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CategoryPickerSection.swift; sourceTree = "<group>"; };
DB2B3ABD25E37E15007045F9 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
DB2F073325E8ECF000957B2D /* AuthenticationViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AuthenticationViewModel.swift; sourceTree = "<group>"; };
DB2FF50F260B113300ADA9FE /* ComposeStatusPollExpiresOptionCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ComposeStatusPollExpiresOptionCollectionViewCell.swift; sourceTree = "<group>"; };
DB336F3E278E668C0031E64B /* StatusTableViewCell+ViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "StatusTableViewCell+ViewModel.swift"; sourceTree = "<group>"; };
DB3D0FED25BAA42200EAA174 /* MastodonSDK */ = {isa = PBXFileReference; lastKnownFileType = folder; path = MastodonSDK; sourceTree = "<group>"; };
DB3E6FDC2806A40F00B035AE /* DiscoveryHashtagsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DiscoveryHashtagsViewController.swift; sourceTree = "<group>"; };
@ -2444,7 +2442,6 @@
DB6B351D2601FAEE00DC1E11 /* ComposeStatusAttachmentCollectionViewCell.swift */,
DB87D4442609BE0500D12C0D /* ComposeStatusPollOptionCollectionViewCell.swift */,
DB87D4502609CF1E00D12C0D /* ComposeStatusPollOptionAppendEntryCollectionViewCell.swift */,
DB2FF50F260B113300ADA9FE /* ComposeStatusPollExpiresOptionCollectionViewCell.swift */,
);
path = CollectionViewCell;
sourceTree = "<group>";
@ -3628,7 +3625,6 @@
2D24E1232626ED9D00A59D4F /* UIView+Gesture.swift in Sources */,
DBFEEC9D279C12C1004F81DD /* ProfileFieldEditCollectionViewCell.swift in Sources */,
DB3E6FEC2806D7F100B035AE /* DiscoveryNewsViewController.swift in Sources */,
DB2FF510260B113300ADA9FE /* ComposeStatusPollExpiresOptionCollectionViewCell.swift in Sources */,
DBCBED1726132DB500B49291 /* UserTimelineViewModel+Diffable.swift in Sources */,
2DE0FACE2615F7AD00CDF649 /* RecommendAccountSection.swift in Sources */,
2DAC9E3E262FC2400062E1A6 /* SuggestionAccountViewModel.swift in Sources */,

View File

@ -506,7 +506,7 @@ private extension SceneCoordinator {
}
let _viewController = SFSafariViewController(url: url)
_viewController.preferredBarTintColor = ThemeService.shared.currentTheme.value.navigationBarBackgroundColor
_viewController.preferredControlTintColor = Asset.Colors.brand.color
_viewController.preferredControlTintColor = Asset.Colors.Brand.blurple.color
viewController = _viewController
case .alertController(let alertController):

View File

@ -69,7 +69,7 @@ extension ProfileFieldSection {
}
// set value
let linkColor = verified ? Asset.Scene.Profile.About.bioAboutFieldVerifiedText.color : Asset.Colors.brand.color
let linkColor = verified ? Asset.Scene.Profile.About.bioAboutFieldVerifiedText.color : Asset.Colors.Brand.blurple.color
do {
let mastodonContent = MastodonContent(content: value, emojis: emojiMeta)
let metaContent = try MastodonMetaContent.convert(document: mastodonContent)

View File

@ -35,7 +35,7 @@ extension UITableView {
let backgroundColor = cell.backgroundColor
UIView.animate(withDuration: 0.3) {
cell.backgroundColor = Asset.Colors.brand.color.withAlphaComponent(0.5)
cell.backgroundColor = Asset.Colors.Brand.blurple.color.withAlphaComponent(0.5)
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
UIView.animate(withDuration: 0.3) {
cell.backgroundColor = backgroundColor

View File

@ -1,78 +0,0 @@
//
// ComposeStatusPollExpiresOptionCollectionViewCell.swift
// Mastodon
//
// Created by MainasuK Cirno on 2021-3-24.
//
import os.log
import UIKit
import Combine
import MastodonAsset
import MastodonCore
import MastodonUI
import MastodonLocalization
//protocol ComposeStatusPollExpiresOptionCollectionViewCellDelegate: AnyObject {
// func composeStatusPollExpiresOptionCollectionViewCell(_ cell: ComposeStatusPollExpiresOptionCollectionViewCell, didSelectExpiresOption expiresOption: ComposeStatusPollItem.PollExpiresOptionAttribute.ExpiresOption)
//}
//
//final class ComposeStatusPollExpiresOptionCollectionViewCell: UICollectionViewCell {
//
// var disposeBag = Set<AnyCancellable>()
// weak var delegate: ComposeStatusPollExpiresOptionCollectionViewCellDelegate?
//
// let durationButton: UIButton = {
// let button = HighlightDimmableButton()
// 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.brand.color, for: .normal)
// return button
// }()
//
// override init(frame: CGRect) {
// super.init(frame: frame)
// _init()
// }
//
// required init?(coder: NSCoder) {
// super.init(coder: coder)
// _init()
// }
//
//}
//
//extension ComposeStatusPollExpiresOptionCollectionViewCell {
//
// private typealias ExpiresOption = ComposeStatusPollItem.PollExpiresOptionAttribute.ExpiresOption
//
// private func _init() {
// durationButton.translatesAutoresizingMaskIntoConstraints = false
// contentView.addSubview(durationButton)
// NSLayoutConstraint.activate([
// durationButton.topAnchor.constraint(equalTo: contentView.topAnchor),
// durationButton.leadingAnchor.constraint(equalTo: contentView.readableContentGuide.leadingAnchor, constant: PollOptionView.checkmarkBackgroundLeadingMargin),
// durationButton.bottomAnchor.constraint(equalTo: contentView.bottomAnchor),
// ])
//
// let children = ExpiresOption.allCases.map { expiresOption -> UIAction in
// UIAction(title: expiresOption.title, image: nil, identifier: nil, discoverabilityTitle: nil, attributes: [], state: .off) { [weak self] action in
// guard let self = self else { return }
// self.expiresOptionActionHandler(action, expiresOption: expiresOption)
// }
// }
// durationButton.menu = UIMenu(title: "", image: nil, identifier: nil, options: .displayInline, children: children)
// durationButton.showsMenuAsPrimaryAction = true
// }
//
//}
//
//extension ComposeStatusPollExpiresOptionCollectionViewCell {
//
// private func expiresOptionActionHandler(_ sender: UIAction, expiresOption: ExpiresOption) {
// os_log(.info, log: .debug, "%{public}s[%{public}ld], %{public}s: select %s", ((#file as NSString).lastPathComponent), #line, #function, expiresOption.title)
// delegate?.composeStatusPollExpiresOptionCollectionViewCell(self, didSelectExpiresOption: expiresOption)
// }
//
//}

View File

@ -34,7 +34,7 @@ final class ComposeStatusPollOptionAppendEntryCollectionViewCell: UICollectionVi
override var isHighlighted: Bool {
didSet {
pollOptionView.roundedBackgroundView.backgroundColor = isHighlighted ? ThemeService.shared.currentTheme.value.tertiarySystemGroupedBackgroundColor.withAlphaComponent(0.6) : ThemeService.shared.currentTheme.value.tertiarySystemGroupedBackgroundColor
pollOptionView.plusCircleImageView.tintColor = isHighlighted ? Asset.Colors.brand.color.withAlphaComponent(0.5) : Asset.Colors.brand.color
pollOptionView.plusCircleImageView.tintColor = isHighlighted ? Asset.Colors.Brand.blurple.color.withAlphaComponent(0.5) : Asset.Colors.Brand.blurple.color
}
}

View File

@ -355,7 +355,7 @@ extension HomeTimelineViewController {
let button = HighlightDimmableButton()
button.titleLabel?.font = UIFontMetrics(forTextStyle: .headline).scaledFont(for: .systemFont(ofSize: 15, weight: .semibold))
button.setTitle(L10n.Common.Controls.Actions.manuallySearch, for: .normal)
button.setTitleColor(Asset.Colors.brand.color, for: .normal)
button.setTitleColor(Asset.Colors.Brand.blurple.color, for: .normal)
button.addTarget(self, action: #selector(HomeTimelineViewController.manuallySearchButtonPressed(_:)), for: .touchUpInside)
return button
}()

View File

@ -110,7 +110,7 @@ extension HomeTimelineNavigationBarTitleView {
configureButton(
title: L10n.Scene.HomeTimeline.NavigationBarState.newPosts,
textColor: .white,
backgroundColor: Asset.Colors.brand.color
backgroundColor: Asset.Colors.Brand.blurple.color
)
button.isHidden = false
button.accessibilityLabel = L10n.Scene.HomeTimeline.NavigationBarState.newPosts

View File

@ -29,7 +29,7 @@ class PickServerCell: UITableViewCell {
let thumbnailImageView: UIImageView = {
let thumbnail = UIImageView()
thumbnail.translatesAutoresizingMaskIntoConstraints = false
thumbnail.backgroundColor = Asset.Colors.brand.color
thumbnail.backgroundColor = Asset.Colors.Brand.blurple.color
thumbnail.layer.cornerRadius = 8
thumbnail.contentMode = .scaleAspectFill
thumbnail.layer.masksToBounds = true
@ -126,7 +126,7 @@ extension PickServerCell {
super.setSelected(selected, animated: animated)
if selected {
checkbox.image = UIImage(systemName: "checkmark")
checkbox.tintColor = Asset.Colors.brand.color
checkbox.tintColor = Asset.Colors.Brand.blurple.color
} else {
checkbox.image = nil
}

View File

@ -234,7 +234,7 @@ final class ProfileHeaderView: UIView {
]
metaText.linkAttributes = [
.font: UIFont.preferredFont(forTextStyle: .body),
.foregroundColor: Asset.Colors.brand.color,
.foregroundColor: Asset.Colors.Brand.blurple.color,
]
return metaText
}()

View File

@ -83,7 +83,7 @@ class MainTabBarController: UITabBarController {
}
var selectedImage: UIImage {
return image.withTintColor(Asset.Colors.brand.color, renderingMode: .alwaysOriginal)
return image.withTintColor(Asset.Colors.Brand.blurple.color, renderingMode: .alwaysOriginal)
}
var largeImage: UIImage {
@ -468,8 +468,8 @@ extension MainTabBarController {
private func updateAvatarButtonAppearance() {
if currentTab == .me {
accountSwitcherChevron.tintColor = Asset.Colors.brand.color
avatarButton.borderColor = Asset.Colors.brand.color
accountSwitcherChevron.tintColor = Asset.Colors.Brand.blurple.color
avatarButton.borderColor = Asset.Colors.Brand.blurple.color
} else {
accountSwitcherChevron.tintColor = Asset.Theme.System.tabBarItemInactiveIconColor.color
avatarButton.borderColor = Asset.Theme.System.tabBarItemInactiveIconColor.color

View File

@ -86,7 +86,7 @@ extension SidebarViewModel {
accessoryImage: item == .me ? self.chevronImage : nil,
title: item.title,
image: item.image,
activeImage: item.selectedImage.withTintColor(Asset.Colors.brand.color, renderingMode: .alwaysOriginal),
activeImage: item.selectedImage.withTintColor(Asset.Colors.Brand.blurple.color, renderingMode: .alwaysOriginal),
imageURL: imageURL
)
cell.setNeedsUpdateConfiguration()
@ -127,7 +127,7 @@ extension SidebarViewModel {
}
}()
cell.item?.image = image
cell.item?.activeImage = image.withTintColor(Asset.Colors.brand.color, renderingMode: .alwaysOriginal)
cell.item?.activeImage = image.withTintColor(Asset.Colors.Brand.blurple.color, renderingMode: .alwaysOriginal)
cell.setNeedsUpdateConfiguration()
}
.store(in: &cell.disposeBag)

View File

@ -34,7 +34,7 @@ extension SidebarAddAccountCollectionViewCell {
// Customize the background color to use the tint color when the cell is highlighted or selected.
if state.isSelected || state.isHighlighted {
newBackgroundConfiguration.backgroundColor = Asset.Colors.brand.color
newBackgroundConfiguration.backgroundColor = Asset.Colors.Brand.blurple.color
}
if state.isHighlighted {
newBackgroundConfiguration.backgroundColorTransformer = .init { $0.withAlphaComponent(0.8) }

View File

@ -21,7 +21,7 @@ final class SidebarListContentView: UIView, UIContentView {
let avatarButton: CircleAvatarButton = {
let button = CircleAvatarButton()
button.borderWidth = 2
button.borderColor = Asset.Colors.brand.color
button.borderColor = Asset.Colors.Brand.blurple.color
return button
}()
private let accessoryImageView = UIImageView(image: nil)
@ -107,7 +107,7 @@ extension SidebarListContentView {
imageView.image = item.isActive ? item.activeImage : item.image.withRenderingMode(.alwaysTemplate)
accessoryImageView.image = item.accessoryImage
accessoryImageView.isHidden = item.accessoryImage == nil
accessoryImageView.tintColor = item.isActive ? Asset.Colors.brand.color : .secondaryLabel
accessoryImageView.tintColor = item.isActive ? Asset.Colors.Brand.blurple.color : .secondaryLabel
avatarButton.avatarImageView.setImage(
url: item.imageURL,
placeholder: avatarButton.avatarImageView.image ?? .placeholder(color: .systemFill), // reuse to avoid blink

View File

@ -33,7 +33,7 @@ class SearchRecommendCollectionHeader: UIView {
let seeAllButton: HighlightDimmableButton = {
let button = HighlightDimmableButton(type: .custom)
button.setTitleColor(Asset.Colors.brand.color, for: .normal)
button.setTitleColor(Asset.Colors.Brand.blurple.color, for: .normal)
button.setTitle(L10n.Scene.Search.Recommend.buttonText, for: .normal)
button.titleLabel?.adjustsFontSizeToFitWidth = true
button.titleLabel?.minimumScaleFactor = 0.8

View File

@ -298,7 +298,7 @@ extension SearchDetailViewController {
private func setupBackgroundColor(theme: Theme) {
navigationBarBackgroundView.backgroundColor = theme.navigationBarBackgroundColor
navigationBar.tintColor = Asset.Colors.brand.color
navigationBar.tintColor = Asset.Colors.Brand.blurple.color
}
}

View File

@ -35,7 +35,7 @@ final class SearchHistoryTableHeaderView: UIView {
let clearSearchHistoryButton: HighlightDimmableButton = {
let button = HighlightDimmableButton(type: .custom)
button.expandEdgeInsets = UIEdgeInsets(top: -10, left: -10, bottom: -10, right: -10)
button.setTitleColor(Asset.Colors.brand.color, for: .normal)
button.setTitleColor(Asset.Colors.Brand.blurple.color, for: .normal)
button.setTitle(L10n.Scene.Search.Searching.clear, for: .normal)
return button
}()

View File

@ -20,7 +20,7 @@ class SettingsToggleTableViewCell: UITableViewCell {
private(set) lazy var switchButton: UISwitch = {
let view = UISwitch(frame:.zero)
view.onTintColor = Asset.Colors.brand.color
view.onTintColor = Asset.Colors.Brand.blurple.color
return view
}()

View File

@ -15,7 +15,7 @@ class NavigationBarProgressView: UIView {
let sliderView: UIView = {
let view = UIView()
view.backgroundColor = Asset.Colors.brand.color
view.backgroundColor = Asset.Colors.Brand.blurple.color
view.translatesAutoresizingMaskIntoConstraints = false
return view
}()

View File

@ -45,7 +45,7 @@ final class SuggestionAccountTableViewCell: UITableViewCell {
]
bioMetaLabel.linkAttributes = [
.font: UIFontMetrics(forTextStyle: .body).scaledFont(for: .systemFont(ofSize: 15, weight: .semibold)),
.foregroundColor: Asset.Colors.brand.color
.foregroundColor: Asset.Colors.Brand.blurple.color
]
bioMetaLabel.isUserInteractionEnabled = false

View File

@ -1,38 +0,0 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xFC",
"green" : "0x2C",
"red" : "0x56"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xFF",
"green" : "0x64",
"red" : "0x63"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@ -97,7 +97,6 @@ public enum Asset {
public static let alertYellow = ColorAsset(name: "Colors/alert.yellow")
public static let badgeBackground = ColorAsset(name: "Colors/badge.background")
public static let battleshipGrey = ColorAsset(name: "Colors/battleshipGrey")
public static let brand = ColorAsset(name: "Colors/brand")
public static let dangerBorder = ColorAsset(name: "Colors/danger.border")
public static let danger = ColorAsset(name: "Colors/danger")
public enum Deprecated {

View File

@ -17,7 +17,7 @@ extension Mastodon.Entity.Notification.NotificationType {
var color: UIColor
switch self {
case .follow:
color = Asset.Colors.brand.color
color = Asset.Colors.Brand.blurple.color
case .favourite:
color = Asset.Colors.Notification.favourite.color
case .reblog:
@ -25,9 +25,9 @@ extension Mastodon.Entity.Notification.NotificationType {
case .mention:
color = Asset.Colors.Notification.mention.color
case .poll:
color = Asset.Colors.brand.color
color = Asset.Colors.Brand.blurple.color
case .followRequest:
color = Asset.Colors.brand.color
color = Asset.Colors.Brand.blurple.color
default:
color = .clear
}

View File

@ -28,7 +28,7 @@ struct SystemTheme: Theme {
let sidebarBackgroundColor = Asset.Theme.System.sidebarBackground.color
let tabBarBackgroundColor = Asset.Theme.System.tabBarBackground.color
let tabBarItemSelectedIconColor = Asset.Colors.brand.color
let tabBarItemSelectedIconColor = Asset.Colors.Brand.blurple.color
let tabBarItemFocusedIconColor = Asset.Theme.System.tabBarItemInactiveIconColor.color
let tabBarItemNormalIconColor = Asset.Theme.System.tabBarItemInactiveIconColor.color
let tabBarItemDisabledIconColor = Asset.Theme.System.tabBarItemInactiveIconColor.color

View File

@ -120,7 +120,7 @@ extension MetaLabel {
case .autoCompletion:
font = UIFontMetrics(forTextStyle: .headline).scaledFont(for: .systemFont(ofSize: 17, weight: .semibold), maximumPointSize: 22)
textColor = Asset.Colors.brand.color
textColor = Asset.Colors.Brand.blurple.color
case .accountListName:
font = UIFontMetrics(forTextStyle: .headline).scaledFont(for: .systemFont(ofSize: 17, weight: .regular), maximumPointSize: 22)
@ -148,7 +148,7 @@ extension MetaLabel {
]
linkAttributes = [
.font: font,
.foregroundColor: Asset.Colors.brand.color
.foregroundColor: Asset.Colors.Brand.blurple.color
]
}

View File

@ -47,7 +47,7 @@ public struct MetaTextViewRepresentable: UIViewRepresentable {
]
metaText.linkAttributes = [
.font: font,
.foregroundColor: Asset.Colors.brand.color,
.foregroundColor: Asset.Colors.Brand.blurple.color,
]
metaText.paragraphStyle = NSMutableParagraphStyle()

View File

@ -50,8 +50,8 @@ extension PollOptionView {
@Published public var voteState: VoteState = .hidden
@Published public var roundedBackgroundViewColor: UIColor = .clear
@Published public var primaryStripProgressViewTintColor: UIColor = Asset.Colors.brand.color.withAlphaComponent(0.8)
@Published public var secondaryStripProgressViewTintColor: UIColor = Asset.Colors.brand.color.withAlphaComponent(0.5)
@Published public var primaryStripProgressViewTintColor: UIColor = Asset.Colors.Brand.blurple.color.withAlphaComponent(0.8)
@Published public var secondaryStripProgressViewTintColor: UIColor = Asset.Colors.Brand.blurple.color.withAlphaComponent(0.5)
@Published public var groupedAccessibilityLabel = ""

View File

@ -32,7 +32,7 @@ public final class PollOptionView: UIView {
public let roundedBackgroundView = UIView()
public let voteProgressStripView: StripProgressView = {
let view = StripProgressView()
view.tintColor = Asset.Colors.brand.color
view.tintColor = Asset.Colors.Brand.blurple.color
return view
}()
@ -45,7 +45,7 @@ public 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.brand.color
imageView.tintColor = Asset.Colors.Brand.blurple.color
return imageView
}()
@ -53,7 +53,7 @@ public final class PollOptionView: UIView {
let imageView = UIImageView()
let image = Asset.Circles.plusCircle.image
imageView.image = image.withRenderingMode(.alwaysTemplate)
imageView.tintColor = Asset.Colors.brand.color
imageView.tintColor = Asset.Colors.Brand.blurple.color
return imageView
}()

View File

@ -80,7 +80,7 @@ public final class ProfileCardView: UIView, AXCustomContentProvider {
]
metaText.linkAttributes = [
.font: UIFont.preferredFont(forTextStyle: .body),
.foregroundColor: Asset.Colors.brand.color,
.foregroundColor: Asset.Colors.Brand.blurple.color,
]
return metaText
}()

View File

@ -156,7 +156,7 @@ public final class StatusView: UIView {
]
metaText.linkAttributes = [
.font: UIFontMetrics(forTextStyle: .body).scaledFont(for: .systemFont(ofSize: 17, weight: .regular)),
.foregroundColor: Asset.Colors.brand.color,
.foregroundColor: Asset.Colors.Brand.blurple.color,
]
return metaText
}()
@ -213,8 +213,8 @@ public 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.brand.color, for: .normal)
button.setTitleColor(Asset.Colors.brand.color.withAlphaComponent(0.8), for: .highlighted)
button.setTitleColor(Asset.Colors.Brand.blurple.color, for: .normal)
button.setTitleColor(Asset.Colors.Brand.blurple.color.withAlphaComponent(0.8), for: .highlighted)
button.setTitleColor(Asset.Colors.Button.disabled.color, for: .disabled)
button.isEnabled = false
return button
@ -253,7 +253,7 @@ public final class StatusView: UIView {
let revertButton = UIButton()
revertButton.titleLabel?.font = UIFontMetrics(forTextStyle: .footnote).scaledFont(for: .systemFont(ofSize: 13, weight: .bold))
revertButton.setTitle(L10n.Common.Controls.Status.Translation.showOriginal, for: .normal)
revertButton.setTitleColor(Asset.Colors.brand.color, for: .normal)
revertButton.setTitleColor(Asset.Colors.Brand.blurple.color, for: .normal)
revertButton.addAction(UIAction { [weak self] _ in
self?.revertTranslation()
}, for: .touchUpInside)

View File

@ -103,8 +103,8 @@ extension UserView.ViewModel {
switch link {
case let .some(link):
userView.authorVerifiedImageView.tintColor = Asset.Colors.brand.color
userView.authorVerifiedLabel.textColor = Asset.Colors.brand.color
userView.authorVerifiedImageView.tintColor = Asset.Colors.Brand.blurple.color
userView.authorVerifiedLabel.textColor = Asset.Colors.Brand.blurple.color
do {
let mastodonContent = MastodonContent(content: link, emojis: [:])
let content = try MastodonMetaContent.convert(document: mastodonContent)

View File

@ -71,7 +71,7 @@ public final class UserView: UIView {
]
label.linkAttributes = [
.font: UIFontMetrics(forTextStyle: .body).scaledFont(for: .systemFont(ofSize: 15, weight: .semibold)),
.foregroundColor: Asset.Colors.brand.color
.foregroundColor: Asset.Colors.Brand.blurple.color
]
label.isUserInteractionEnabled = false
return label

View File

@ -103,7 +103,7 @@ extension LineChartView {
maskPath.close()
let maskLayer = CAShapeLayer()
maskLayer.path = maskPath.cgPath
maskLayer.fillColor = Asset.Colors.brand.color.cgColor
maskLayer.fillColor = Asset.Colors.Brand.blurple.color.cgColor
maskLayer.strokeColor = UIColor.clear.cgColor
maskLayer.lineWidth = 0.0
gradientLayer.mask = maskLayer