forked from zelo72/mastodon-ios
chore: update background dark mode to follow system naming
This commit is contained in:
parent
6c973ed17c
commit
1723891099
|
@ -44,7 +44,6 @@ internal enum Asset {
|
|||
internal static let mediaTypeIndicotor = ColorAsset(name: "Colors/Background/media.type.indicotor")
|
||||
internal static let navigationBar = ColorAsset(name: "Colors/Background/navigationBar")
|
||||
internal static let onboardingBackground = ColorAsset(name: "Colors/Background/onboarding.background")
|
||||
internal static let searchResult = ColorAsset(name: "Colors/Background/searchResult")
|
||||
internal static let secondaryGroupedSystemBackground = ColorAsset(name: "Colors/Background/secondary.grouped.system.background")
|
||||
internal static let secondarySystemBackground = ColorAsset(name: "Colors/Background/secondary.system.background")
|
||||
internal static let systemBackground = ColorAsset(name: "Colors/Background/system.background")
|
||||
|
|
|
@ -1,38 +0,0 @@
|
|||
{
|
||||
"colors" : [
|
||||
{
|
||||
"color" : {
|
||||
"color-space" : "srgb",
|
||||
"components" : {
|
||||
"alpha" : "1.000",
|
||||
"blue" : "0xFE",
|
||||
"green" : "0xFF",
|
||||
"red" : "0xFE"
|
||||
}
|
||||
},
|
||||
"idiom" : "universal"
|
||||
},
|
||||
{
|
||||
"appearances" : [
|
||||
{
|
||||
"appearance" : "luminosity",
|
||||
"value" : "dark"
|
||||
}
|
||||
],
|
||||
"color" : {
|
||||
"color-space" : "srgb",
|
||||
"components" : {
|
||||
"alpha" : "1.000",
|
||||
"blue" : "0x00",
|
||||
"green" : "0x00",
|
||||
"red" : "0x00"
|
||||
}
|
||||
},
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
|
@ -23,9 +23,9 @@
|
|||
"color-space" : "srgb",
|
||||
"components" : {
|
||||
"alpha" : "1.000",
|
||||
"blue" : "0x00",
|
||||
"green" : "0x00",
|
||||
"red" : "0x00"
|
||||
"blue" : "0x2E",
|
||||
"green" : "0x2C",
|
||||
"red" : "0x2C"
|
||||
}
|
||||
},
|
||||
"idiom" : "universal"
|
||||
|
|
|
@ -23,9 +23,9 @@
|
|||
"color-space" : "srgb",
|
||||
"components" : {
|
||||
"alpha" : "1.000",
|
||||
"blue" : "0x00",
|
||||
"green" : "0x00",
|
||||
"red" : "0x00"
|
||||
"blue" : "0x2E",
|
||||
"green" : "0x2C",
|
||||
"red" : "0x2C"
|
||||
}
|
||||
},
|
||||
"idiom" : "universal"
|
||||
|
|
|
@ -23,9 +23,9 @@
|
|||
"color-space" : "srgb",
|
||||
"components" : {
|
||||
"alpha" : "1.000",
|
||||
"blue" : "0x2E",
|
||||
"green" : "0x2C",
|
||||
"red" : "0x2C"
|
||||
"blue" : "0x00",
|
||||
"green" : "0x00",
|
||||
"red" : "0x00"
|
||||
}
|
||||
},
|
||||
"idiom" : "universal"
|
||||
|
|
|
@ -23,9 +23,9 @@
|
|||
"color-space" : "srgb",
|
||||
"components" : {
|
||||
"alpha" : "1.000",
|
||||
"blue" : "46",
|
||||
"green" : "44",
|
||||
"red" : "44"
|
||||
"blue" : "0x00",
|
||||
"green" : "0x00",
|
||||
"red" : "0x00"
|
||||
}
|
||||
},
|
||||
"idiom" : "universal"
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
"color-space" : "srgb",
|
||||
"components" : {
|
||||
"alpha" : "1.000",
|
||||
"blue" : "0xE8",
|
||||
"green" : "0xE1",
|
||||
"red" : "0xD9"
|
||||
"blue" : "0xFE",
|
||||
"green" : "0xFF",
|
||||
"red" : "0xFE"
|
||||
}
|
||||
},
|
||||
"idiom" : "universal"
|
||||
|
|
|
@ -23,9 +23,9 @@
|
|||
"color-space" : "srgb",
|
||||
"components" : {
|
||||
"alpha" : "1.000",
|
||||
"blue" : "0x1E",
|
||||
"green" : "0x1C",
|
||||
"red" : "0x1C"
|
||||
"blue" : "30",
|
||||
"green" : "28",
|
||||
"red" : "28"
|
||||
}
|
||||
},
|
||||
"idiom" : "universal"
|
||||
|
|
|
@ -38,7 +38,7 @@ extension ComposeRepliedToStatusContentCollectionViewCell {
|
|||
|
||||
private func _init() {
|
||||
backgroundColor = .clear
|
||||
statusView.contentWarningBlurContentImageView.backgroundColor = Asset.Scene.Compose.background.color
|
||||
statusView.contentWarningBlurContentImageView.backgroundColor = Asset.Colors.Background.systemBackground.color
|
||||
|
||||
statusView.translatesAutoresizingMaskIntoConstraints = false
|
||||
contentView.addSubview(statusView)
|
||||
|
|
|
@ -29,7 +29,7 @@ final class ComposeStatusPollOptionAppendEntryCollectionViewCell: UICollectionVi
|
|||
|
||||
override var isHighlighted: Bool {
|
||||
didSet {
|
||||
pollOptionView.roundedBackgroundView.backgroundColor = isHighlighted ? Asset.Colors.Background.secondarySystemBackground.color : Asset.Colors.Background.systemBackground.color
|
||||
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
|
||||
}
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ extension ComposeStatusPollOptionAppendEntryCollectionViewCell {
|
|||
pollOptionView.optionTextField.isHidden = true
|
||||
pollOptionView.plusCircleImageView.isHidden = false
|
||||
|
||||
pollOptionView.roundedBackgroundView.backgroundColor = Asset.Colors.Background.systemBackground.color
|
||||
pollOptionView.roundedBackgroundView.backgroundColor = Asset.Colors.Background.secondarySystemBackground.color
|
||||
setupBorderColor()
|
||||
|
||||
pollOptionView.addGestureRecognizer(singleTagGestureRecognizer)
|
||||
|
|
|
@ -49,7 +49,7 @@ final class ComposeViewController: UIViewController, NeedsDependency {
|
|||
collectionView.register(ComposeStatusPollOptionCollectionViewCell.self, forCellWithReuseIdentifier: String(describing: ComposeStatusPollOptionCollectionViewCell.self))
|
||||
collectionView.register(ComposeStatusPollOptionAppendEntryCollectionViewCell.self, forCellWithReuseIdentifier: String(describing: ComposeStatusPollOptionAppendEntryCollectionViewCell.self))
|
||||
collectionView.register(ComposeStatusPollExpiresOptionCollectionViewCell.self, forCellWithReuseIdentifier: String(describing: ComposeStatusPollExpiresOptionCollectionViewCell.self))
|
||||
collectionView.backgroundColor = Asset.Colors.Background.systemBackground.color
|
||||
collectionView.backgroundColor = Asset.Scene.Compose.background.color
|
||||
return collectionView
|
||||
}()
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ extension HashtagTimelineViewController {
|
|||
titleView.update(title: viewModel.hashtag, subtitle: nil)
|
||||
navigationItem.titleView = titleView
|
||||
|
||||
view.backgroundColor = Asset.Colors.Background.systemGroupedBackground.color
|
||||
view.backgroundColor = Asset.Colors.Background.secondarySystemBackground.color
|
||||
|
||||
navigationItem.rightBarButtonItem = composeBarButtonItem
|
||||
|
||||
|
|
|
@ -47,7 +47,6 @@ final class HomeTimelineViewController: UIViewController, NeedsDependency {
|
|||
tableView.rowHeight = UITableView.automaticDimension
|
||||
tableView.separatorStyle = .none
|
||||
tableView.backgroundColor = .clear
|
||||
|
||||
return tableView
|
||||
}()
|
||||
|
||||
|
@ -71,7 +70,7 @@ extension HomeTimelineViewController {
|
|||
super.viewDidLoad()
|
||||
|
||||
title = L10n.Scene.HomeTimeline.title
|
||||
view.backgroundColor = Asset.Colors.Background.systemGroupedBackground.color
|
||||
view.backgroundColor = Asset.Colors.Background.secondarySystemBackground.color
|
||||
navigationItem.leftBarButtonItem = settingBarButtonItem
|
||||
navigationItem.titleView = titleView
|
||||
titleView.delegate = self
|
||||
|
|
|
@ -45,7 +45,7 @@ extension FavoriteViewController {
|
|||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
view.backgroundColor = Asset.Colors.Background.systemGroupedBackground.color
|
||||
view.backgroundColor = Asset.Colors.Background.secondarySystemBackground.color
|
||||
navigationItem.titleView = titleView
|
||||
titleView.update(title: L10n.Scene.Favorite.title, subtitle: nil)
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ extension UserTimelineViewController {
|
|||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
view.backgroundColor = Asset.Colors.Background.systemGroupedBackground.color
|
||||
view.backgroundColor = Asset.Colors.Background.secondarySystemBackground.color
|
||||
|
||||
tableView.translatesAutoresizingMaskIntoConstraints = false
|
||||
view.addSubview(tableView)
|
||||
|
|
|
@ -82,7 +82,7 @@ final class SearchViewController: UIViewController, NeedsDependency {
|
|||
// searching
|
||||
let searchingTableView: UITableView = {
|
||||
let tableView = UITableView()
|
||||
tableView.backgroundColor = Asset.Colors.Background.searchResult.color
|
||||
tableView.backgroundColor = Asset.Colors.Background.systemGroupedBackground.color
|
||||
tableView.rowHeight = UITableView.automaticDimension
|
||||
tableView.separatorStyle = .singleLine
|
||||
tableView.separatorInset = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0)
|
||||
|
|
|
@ -27,7 +27,7 @@ final class PollOptionView: UIView {
|
|||
|
||||
let checkmarkBackgroundView: UIView = {
|
||||
let view = UIView()
|
||||
view.backgroundColor = .systemBackground
|
||||
view.backgroundColor = Asset.Colors.Background.tertiarySystemBackground.color
|
||||
return view
|
||||
}()
|
||||
|
||||
|
@ -81,6 +81,7 @@ final class PollOptionView: UIView {
|
|||
|
||||
extension PollOptionView {
|
||||
private func _init() {
|
||||
// default color in the timeline
|
||||
roundedBackgroundView.backgroundColor = Asset.Colors.Background.systemGroupedBackground.color
|
||||
|
||||
roundedBackgroundView.translatesAutoresizingMaskIntoConstraints = false
|
||||
|
|
|
@ -181,7 +181,7 @@ final class StatusView: UIView {
|
|||
// do not use visual effect view due to we blur text only without background
|
||||
let contentWarningBlurContentImageView: UIImageView = {
|
||||
let imageView = UIImageView()
|
||||
imageView.backgroundColor = Asset.Colors.Background.secondaryGroupedSystemBackground.color
|
||||
imageView.backgroundColor = Asset.Colors.Background.systemBackground.color
|
||||
imageView.layer.masksToBounds = false
|
||||
return imageView
|
||||
}()
|
||||
|
|
|
@ -102,7 +102,7 @@ final class StatusTableViewCell: UITableViewCell {
|
|||
extension StatusTableViewCell {
|
||||
|
||||
private func _init() {
|
||||
backgroundColor = Asset.Colors.Background.secondaryGroupedSystemBackground.color
|
||||
backgroundColor = Asset.Colors.Background.systemBackground.color
|
||||
statusView.contentWarningBlurContentImageView.backgroundColor = Asset.Colors.Background.secondaryGroupedSystemBackground.color
|
||||
|
||||
statusView.translatesAutoresizingMaskIntoConstraints = false
|
||||
|
|
|
@ -73,7 +73,7 @@ class TimelineLoaderTableViewCell: UITableViewCell {
|
|||
|
||||
func _init() {
|
||||
selectionStyle = .none
|
||||
backgroundColor = Asset.Colors.Background.systemGroupedBackground.color
|
||||
backgroundColor = .clear
|
||||
|
||||
loadMoreButton.translatesAutoresizingMaskIntoConstraints = false
|
||||
contentView.addSubview(loadMoreButton)
|
||||
|
|
Loading…
Reference in New Issue