diff --git a/Mastodon/Scene/Compose/ComposeViewController.swift b/Mastodon/Scene/Compose/ComposeViewController.swift index 04687ca5..669861d0 100644 --- a/Mastodon/Scene/Compose/ComposeViewController.swift +++ b/Mastodon/Scene/Compose/ComposeViewController.swift @@ -669,8 +669,16 @@ extension ComposeViewController { } private func setupBackgroundColor(theme: Theme) { - view.backgroundColor = theme.systemElevatedBackgroundColor - tableView.backgroundColor = theme.systemElevatedBackgroundColor + let backgroundColor = UIColor(dynamicProvider: { traitCollection in + switch traitCollection.userInterfaceStyle { + case .light: + return .systemBackground + default: + return theme.systemElevatedBackgroundColor + } + }) + view.backgroundColor = backgroundColor + tableView.backgroundColor = backgroundColor composeToolbarBackgroundView.backgroundColor = theme.composeToolbarBackgroundColor } diff --git a/Mastodon/Scene/Notification/Cell/NotificationTableViewCell.swift b/Mastodon/Scene/Notification/Cell/NotificationTableViewCell.swift index 17b1b9a1..fe2f8736 100644 --- a/Mastodon/Scene/Notification/Cell/NotificationTableViewCell.swift +++ b/Mastodon/Scene/Notification/Cell/NotificationTableViewCell.swift @@ -16,6 +16,7 @@ final class NotificationTableViewCell: UITableViewCell { weak var delegate: NotificationTableViewCellDelegate? var disposeBag = Set() + private var _disposeBag = Set() let notificationView = NotificationView() @@ -66,6 +67,14 @@ extension NotificationTableViewCell { separatorLine.heightAnchor.constraint(equalToConstant: UIView.separatorLineHeight(of: contentView)).priority(.required - 1), ]) + notificationView.quoteBackgroundView.backgroundColor = ThemeService.shared.currentTheme.value.secondarySystemBackgroundColor + ThemeService.shared.currentTheme + .sink { [weak self] theme in + guard let self = self else { return } + self.notificationView.quoteBackgroundView.backgroundColor = theme.secondarySystemBackgroundColor + } + .store(in: &_disposeBag) + notificationView.delegate = self } diff --git a/Mastodon/Scene/Onboarding/ConfirmEmail/MastodonConfirmEmailViewController.swift b/Mastodon/Scene/Onboarding/ConfirmEmail/MastodonConfirmEmailViewController.swift index 2c1a67f3..b1b2280d 100644 --- a/Mastodon/Scene/Onboarding/ConfirmEmail/MastodonConfirmEmailViewController.swift +++ b/Mastodon/Scene/Onboarding/ConfirmEmail/MastodonConfirmEmailViewController.swift @@ -51,7 +51,7 @@ final class MastodonConfirmEmailViewController: UIViewController, NeedsDependenc let navigationActionView: NavigationActionView = { let navigationActionView = NavigationActionView() - navigationActionView.backgroundColor = Asset.Scene.Onboarding.onboardingBackground.color + navigationActionView.backgroundColor = Asset.Scene.Onboarding.background.color return navigationActionView }() diff --git a/Mastodon/Scene/Onboarding/PickServer/MastodonPickServerViewController.swift b/Mastodon/Scene/Onboarding/PickServer/MastodonPickServerViewController.swift index 78a43395..2d43faa5 100644 --- a/Mastodon/Scene/Onboarding/PickServer/MastodonPickServerViewController.swift +++ b/Mastodon/Scene/Onboarding/PickServer/MastodonPickServerViewController.swift @@ -51,7 +51,7 @@ final class MastodonPickServerViewController: UIViewController, NeedsDependency let navigationActionView: NavigationActionView = { let navigationActionView = NavigationActionView() - navigationActionView.backgroundColor = Asset.Scene.Onboarding.onboardingBackground.color + navigationActionView.backgroundColor = Asset.Scene.Onboarding.background.color return navigationActionView }() diff --git a/Mastodon/Scene/Onboarding/PickServer/TableViewCell/PickServerCell.swift b/Mastodon/Scene/Onboarding/PickServer/TableViewCell/PickServerCell.swift index cf92778b..66906777 100644 --- a/Mastodon/Scene/Onboarding/PickServer/TableViewCell/PickServerCell.swift +++ b/Mastodon/Scene/Onboarding/PickServer/TableViewCell/PickServerCell.swift @@ -114,7 +114,7 @@ class PickServerCell: UITableViewCell { extension PickServerCell { private func _init() { selectionStyle = .none - backgroundColor = Asset.Scene.Onboarding.onboardingBackground.color + backgroundColor = Asset.Scene.Onboarding.background.color checkbox.translatesAutoresizingMaskIntoConstraints = false contentView.addSubview(checkbox) diff --git a/Mastodon/Scene/Onboarding/PickServer/View/PickServerServerSectionTableHeaderView.swift b/Mastodon/Scene/Onboarding/PickServer/View/PickServerServerSectionTableHeaderView.swift index f26f79b0..b2269b9c 100644 --- a/Mastodon/Scene/Onboarding/PickServer/View/PickServerServerSectionTableHeaderView.swift +++ b/Mastodon/Scene/Onboarding/PickServer/View/PickServerServerSectionTableHeaderView.swift @@ -136,7 +136,7 @@ final class PickServerServerSectionTableHeaderView: UIView { extension PickServerServerSectionTableHeaderView { private func _init() { preservesSuperviewLayoutMargins = true - backgroundColor = Asset.Scene.Onboarding.onboardingBackground.color + backgroundColor = Asset.Scene.Onboarding.background.color collectionView.translatesAutoresizingMaskIntoConstraints = false collectionView.preservesSuperviewLayoutMargins = true diff --git a/Mastodon/Scene/Onboarding/Register/MastodonRegisterViewController.swift b/Mastodon/Scene/Onboarding/Register/MastodonRegisterViewController.swift index f4edf8e8..bd2db3d4 100644 --- a/Mastodon/Scene/Onboarding/Register/MastodonRegisterViewController.swift +++ b/Mastodon/Scene/Onboarding/Register/MastodonRegisterViewController.swift @@ -69,7 +69,7 @@ final class MastodonRegisterViewController: UIViewController, NeedsDependency, O let navigationActionView: NavigationActionView = { let navigationActionView = NavigationActionView() - navigationActionView.backgroundColor = Asset.Scene.Onboarding.onboardingBackground.color + navigationActionView.backgroundColor = Asset.Scene.Onboarding.background.color return navigationActionView }() diff --git a/Mastodon/Scene/Onboarding/ServerRules/MastodonServerRulesViewController.swift b/Mastodon/Scene/Onboarding/ServerRules/MastodonServerRulesViewController.swift index 74649bc2..2f13ad19 100644 --- a/Mastodon/Scene/Onboarding/ServerRules/MastodonServerRulesViewController.swift +++ b/Mastodon/Scene/Onboarding/ServerRules/MastodonServerRulesViewController.swift @@ -46,7 +46,7 @@ final class MastodonServerRulesViewController: UIViewController, NeedsDependency let navigationActionView: NavigationActionView = { let navigationActionView = NavigationActionView() - navigationActionView.backgroundColor = Asset.Scene.Onboarding.onboardingBackground.color + navigationActionView.backgroundColor = Asset.Scene.Onboarding.background.color return navigationActionView }() diff --git a/Mastodon/Scene/Onboarding/Share/OnboardingHeadlineTableViewCell.swift b/Mastodon/Scene/Onboarding/Share/OnboardingHeadlineTableViewCell.swift index a6c603c2..a5d6e588 100644 --- a/Mastodon/Scene/Onboarding/Share/OnboardingHeadlineTableViewCell.swift +++ b/Mastodon/Scene/Onboarding/Share/OnboardingHeadlineTableViewCell.swift @@ -46,7 +46,7 @@ extension OnboardingHeadlineTableViewCell { private func _init() { selectionStyle = .none - backgroundColor = Asset.Scene.Onboarding.onboardingBackground.color + backgroundColor = Asset.Scene.Onboarding.background.color let container = UIStackView() container.axis = .vertical diff --git a/Mastodon/Scene/Onboarding/Share/OnboardingViewControllerAppearance.swift b/Mastodon/Scene/Onboarding/Share/OnboardingViewControllerAppearance.swift index 5c51fb55..ba1eecfc 100644 --- a/Mastodon/Scene/Onboarding/Share/OnboardingViewControllerAppearance.swift +++ b/Mastodon/Scene/Onboarding/Share/OnboardingViewControllerAppearance.swift @@ -40,7 +40,7 @@ extension OnboardingViewControllerAppearance { } func setupOnboardingAppearance() { - view.backgroundColor = Asset.Scene.Onboarding.onboardingBackground.color + view.backgroundColor = Asset.Scene.Onboarding.background.color setupNavigationBarAppearance() @@ -72,7 +72,7 @@ extension OnboardingViewControllerAppearance { func setupNavigationBarBackgroundView() { let navigationBarBackgroundView: UIView = { let view = UIView() - view.backgroundColor = Asset.Scene.Onboarding.onboardingBackground.color + view.backgroundColor = Asset.Scene.Onboarding.background.color return view }() diff --git a/Mastodon/Scene/Profile/Header/View/ProfileRelationshipActionButton.swift b/Mastodon/Scene/Profile/Header/View/ProfileRelationshipActionButton.swift index 8935783f..34b8bd7c 100644 --- a/Mastodon/Scene/Profile/Header/View/ProfileRelationshipActionButton.swift +++ b/Mastodon/Scene/Profile/Header/View/ProfileRelationshipActionButton.swift @@ -13,7 +13,7 @@ final class ProfileRelationshipActionButton: RoundedEdgesButton { let activityIndicatorView: UIActivityIndicatorView = { let activityIndicatorView = UIActivityIndicatorView(style: .medium) - activityIndicatorView.color = .white + activityIndicatorView.color = Asset.Colors.Label.primaryReverse.color return activityIndicatorView }() @@ -44,19 +44,21 @@ extension ProfileRelationshipActionButton { activityIndicatorView.hidesWhenStopped = true activityIndicatorView.stopAnimating() } + + override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { + super.traitCollectionDidChange(previousTraitCollection) + + if traitCollection.hasDifferentColorAppearance(comparedTo: previousTraitCollection) { + configureAppearance() + } + } } extension ProfileRelationshipActionButton { func configure(actionOptionSet: ProfileViewModel.RelationshipActionOptionSet) { setTitle(actionOptionSet.title, for: .normal) - setTitleColor(.white, for: .normal) - setTitleColor(UIColor.white.withAlphaComponent(0.5), for: .highlighted) - setBackgroundImage(.placeholder(color: Asset.Scene.Profile.RelationshipButton.background.color), for: .normal) - setBackgroundImage(.placeholder(color: Asset.Scene.Profile.RelationshipButton.backgroundHighlighted.color), for: .highlighted) - setBackgroundImage(.placeholder(color: Asset.Scene.Profile.RelationshipButton.backgroundHighlighted.color), for: .disabled) -// setBackgroundImage(.placeholder(color: actionOptionSet.backgroundColor), for: .normal) -// setBackgroundImage(.placeholder(color: actionOptionSet.backgroundColor.withAlphaComponent(0.5)), for: .highlighted) -// setBackgroundImage(.placeholder(color: actionOptionSet.backgroundColor.withAlphaComponent(0.5)), for: .disabled) + + configureAppearance() titleEdgeInsets = UIEdgeInsets(top: 0, left: 4, bottom: 0, right: 4) @@ -71,5 +73,16 @@ extension ProfileRelationshipActionButton { isEnabled = true } } + + private func configureAppearance() { + setTitleColor(Asset.Colors.Label.primaryReverse.color, for: .normal) + setTitleColor(Asset.Colors.Label.primaryReverse.color.withAlphaComponent(0.5), for: .highlighted) + setBackgroundImage(.placeholder(color: Asset.Scene.Profile.RelationshipButton.background.color), for: .normal) + setBackgroundImage(.placeholder(color: Asset.Scene.Profile.RelationshipButton.backgroundHighlighted.color), for: .highlighted) + setBackgroundImage(.placeholder(color: Asset.Scene.Profile.RelationshipButton.backgroundHighlighted.color), for: .disabled) +// setBackgroundImage(.placeholder(color: actionOptionSet.backgroundColor), for: .normal) +// setBackgroundImage(.placeholder(color: actionOptionSet.backgroundColor.withAlphaComponent(0.5)), for: .highlighted) +// setBackgroundImage(.placeholder(color: actionOptionSet.backgroundColor.withAlphaComponent(0.5)), for: .disabled) + } } diff --git a/Mastodon/Scene/Report/ReportResult/ReportResultViewController.swift b/Mastodon/Scene/Report/ReportResult/ReportResultViewController.swift index 6970b856..26f56b98 100644 --- a/Mastodon/Scene/Report/ReportResult/ReportResultViewController.swift +++ b/Mastodon/Scene/Report/ReportResult/ReportResultViewController.swift @@ -39,7 +39,7 @@ final class ReportResultViewController: UIViewController, NeedsDependency, Repor let navigationActionView: NavigationActionView = { let navigationActionView = NavigationActionView() - navigationActionView.backgroundColor = Asset.Scene.Onboarding.onboardingBackground.color + navigationActionView.backgroundColor = Asset.Scene.Onboarding.background.color navigationActionView.hidesBackButton = true navigationActionView.nextButton.setTitle(L10n.Common.Controls.Actions.done, for: .normal) return navigationActionView diff --git a/Mastodon/Scene/Report/ReportStatus/ReportViewController.swift b/Mastodon/Scene/Report/ReportStatus/ReportViewController.swift index 4cb1f56f..12291a96 100644 --- a/Mastodon/Scene/Report/ReportStatus/ReportViewController.swift +++ b/Mastodon/Scene/Report/ReportStatus/ReportViewController.swift @@ -47,7 +47,7 @@ class ReportViewController: UIViewController, NeedsDependency, ReportViewControl let navigationActionView: NavigationActionView = { let navigationActionView = NavigationActionView() - navigationActionView.backgroundColor = Asset.Scene.Onboarding.onboardingBackground.color + navigationActionView.backgroundColor = Asset.Scene.Onboarding.background.color navigationActionView.backButton.setTitle(L10n.Common.Controls.Actions.skip, for: .normal) return navigationActionView }() diff --git a/Mastodon/Scene/Report/ReportSupplementary/ReportSupplementaryViewController.swift b/Mastodon/Scene/Report/ReportSupplementary/ReportSupplementaryViewController.swift index 44545dd2..4f6e102b 100644 --- a/Mastodon/Scene/Report/ReportSupplementary/ReportSupplementaryViewController.swift +++ b/Mastodon/Scene/Report/ReportSupplementary/ReportSupplementaryViewController.swift @@ -55,7 +55,7 @@ final class ReportSupplementaryViewController: UIViewController, NeedsDependency let navigationActionView: NavigationActionView = { let navigationActionView = NavigationActionView() - navigationActionView.backgroundColor = Asset.Scene.Onboarding.onboardingBackground.color + navigationActionView.backgroundColor = Asset.Scene.Onboarding.background.color navigationActionView.backButton.setTitle(L10n.Common.Controls.Actions.skip, for: .normal) return navigationActionView }() diff --git a/Mastodon/Scene/Share/View/Content/PollOptionView+Configuration.swift b/Mastodon/Scene/Share/View/Content/PollOptionView+Configuration.swift index a4183a83..717c35f8 100644 --- a/Mastodon/Scene/Share/View/Content/PollOptionView+Configuration.swift +++ b/Mastodon/Scene/Share/View/Content/PollOptionView+Configuration.swift @@ -20,7 +20,7 @@ extension PollOptionView { .receive(on: DispatchQueue.main) .sink { [weak self] theme in guard let self = self else { return } - self.viewModel.roundedBackgroundViewColor = theme.secondarySystemBackgroundColor + self.viewModel.roundedBackgroundViewColor = theme.systemElevatedBackgroundColor } .store(in: &disposeBag) // metaContent diff --git a/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Onboarding/onboarding.background.colorset/Contents.json b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Onboarding/background.colorset/Contents.json similarity index 100% rename from MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Onboarding/onboarding.background.colorset/Contents.json rename to MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Onboarding/background.colorset/Contents.json diff --git a/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Setting/Contents.json b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Setting/Contents.json new file mode 100644 index 00000000..6e965652 --- /dev/null +++ b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Setting/Contents.json @@ -0,0 +1,9 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "provides-namespace" : true + } +} diff --git a/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Setting/background.colorset/Contents.json b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Setting/background.colorset/Contents.json new file mode 100644 index 00000000..4d55227b --- /dev/null +++ b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Setting/background.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0.969", + "green" : "0.949", + "red" : "0.949" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0.129", + "green" : "0.106", + "red" : "0.098" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Theme/Mastodon/Background/secondary.system.background.colorset/Contents.json b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Theme/Mastodon/Background/secondary.system.background.colorset/Contents.json index c915c891..14b5119b 100644 --- a/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Theme/Mastodon/Background/secondary.system.background.colorset/Contents.json +++ b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Theme/Mastodon/Background/secondary.system.background.colorset/Contents.json @@ -5,9 +5,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "0.910", - "green" : "0.882", - "red" : "0.851" + "blue" : "0xF7", + "green" : "0xF2", + "red" : "0xF2" } }, "idiom" : "universal" diff --git a/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Theme/Mastodon/Background/system.elevated.background.colorset/Contents.json b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Theme/Mastodon/Background/system.elevated.background.colorset/Contents.json index 33b71ef9..d47dc714 100644 --- a/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Theme/Mastodon/Background/system.elevated.background.colorset/Contents.json +++ b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Theme/Mastodon/Background/system.elevated.background.colorset/Contents.json @@ -5,9 +5,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "1.000", - "green" : "1.000", - "red" : "1.000" + "blue" : "0xF2", + "green" : "0xED", + "red" : "0xE9" } }, "idiom" : "universal" diff --git a/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Theme/Mastodon/Background/system.grouped.background.colorset/Contents.json b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Theme/Mastodon/Background/system.grouped.background.colorset/Contents.json index c915c891..14b5119b 100644 --- a/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Theme/Mastodon/Background/system.grouped.background.colorset/Contents.json +++ b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Theme/Mastodon/Background/system.grouped.background.colorset/Contents.json @@ -5,9 +5,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "0.910", - "green" : "0.882", - "red" : "0.851" + "blue" : "0xF7", + "green" : "0xF2", + "red" : "0xF2" } }, "idiom" : "universal" diff --git a/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Theme/Mastodon/Background/tertiary.system.grouped.background.colorset/Contents.json b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Theme/Mastodon/Background/tertiary.system.grouped.background.colorset/Contents.json index 98dd7bbd..bc3fb38b 100644 --- a/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Theme/Mastodon/Background/tertiary.system.grouped.background.colorset/Contents.json +++ b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Theme/Mastodon/Background/tertiary.system.grouped.background.colorset/Contents.json @@ -5,9 +5,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "0.910", - "green" : "0.882", - "red" : "0.851" + "blue" : "0xF7", + "green" : "0xF2", + "red" : "0xF2" } }, "idiom" : "universal" diff --git a/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Theme/system/Background/secondary.grouped.system.background.colorset/Contents.json b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Theme/system/Background/secondary.grouped.system.background.colorset/Contents.json index b054549a..b0a1b74f 100644 --- a/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Theme/system/Background/secondary.grouped.system.background.colorset/Contents.json +++ b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Theme/system/Background/secondary.grouped.system.background.colorset/Contents.json @@ -5,9 +5,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "0.996", - "green" : "1.000", - "red" : "0.996" + "blue" : "254", + "green" : "255", + "red" : "254" } }, "idiom" : "universal" @@ -23,9 +23,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "0.180", - "green" : "0.173", - "red" : "0.173" + "blue" : "0x2D", + "green" : "0x2C", + "red" : "0x2C" } }, "idiom" : "universal" diff --git a/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Theme/system/Background/secondary.system.background.colorset/Contents.json b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Theme/system/Background/secondary.system.background.colorset/Contents.json index facc139f..8fd668a5 100644 --- a/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Theme/system/Background/secondary.system.background.colorset/Contents.json +++ b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Theme/system/Background/secondary.system.background.colorset/Contents.json @@ -5,9 +5,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "0.910", - "green" : "0.878", - "red" : "0.851" + "blue" : "0xF7", + "green" : "0xF2", + "red" : "0xF2" } }, "idiom" : "universal" @@ -23,9 +23,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "0.180", - "green" : "0.173", - "red" : "0.173" + "blue" : "0x2D", + "green" : "0x2C", + "red" : "0x2C" } }, "idiom" : "universal" diff --git a/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Theme/system/Background/system.background.colorset/Contents.json b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Theme/system/Background/system.background.colorset/Contents.json index 2b3ad55e..ab7d9539 100644 --- a/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Theme/system/Background/system.background.colorset/Contents.json +++ b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Theme/system/Background/system.background.colorset/Contents.json @@ -23,9 +23,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "0.000", - "green" : "0.000", - "red" : "0.000" + "blue" : "0x00", + "green" : "0x00", + "red" : "0x00" } }, "idiom" : "universal" diff --git a/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Theme/system/Background/system.elevated.background.colorset/Contents.json b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Theme/system/Background/system.elevated.background.colorset/Contents.json index ca11ee75..25365248 100644 --- a/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Theme/system/Background/system.elevated.background.colorset/Contents.json +++ b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Theme/system/Background/system.elevated.background.colorset/Contents.json @@ -5,9 +5,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "1.000", - "green" : "1.000", - "red" : "1.000" + "blue" : "0xF2", + "green" : "0xED", + "red" : "0xE9" } }, "idiom" : "universal" @@ -23,9 +23,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "0.118", - "green" : "0.110", - "red" : "0.110" + "blue" : "30", + "green" : "28", + "red" : "28" } }, "idiom" : "universal" diff --git a/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Theme/system/Background/system.grouped.background.colorset/Contents.json b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Theme/system/Background/system.grouped.background.colorset/Contents.json index bcd0e01f..05051dc5 100644 --- a/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Theme/system/Background/system.grouped.background.colorset/Contents.json +++ b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Theme/system/Background/system.grouped.background.colorset/Contents.json @@ -5,9 +5,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "0.910", - "green" : "0.878", - "red" : "0.851" + "blue" : "0xF7", + "green" : "0xF2", + "red" : "0xF2" } }, "idiom" : "universal" diff --git a/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Theme/system/Background/tertiary.system.grouped.background.colorset/Contents.json b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Theme/system/Background/tertiary.system.grouped.background.colorset/Contents.json index 6b9fb70a..30aadfbc 100644 --- a/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Theme/system/Background/tertiary.system.grouped.background.colorset/Contents.json +++ b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Theme/system/Background/tertiary.system.grouped.background.colorset/Contents.json @@ -5,9 +5,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "0.910", - "green" : "0.882", - "red" : "0.851" + "blue" : "0xF7", + "green" : "0xF2", + "red" : "0xF2" } }, "idiom" : "universal" diff --git a/MastodonSDK/Sources/MastodonAsset/Generated/Assets.swift b/MastodonSDK/Sources/MastodonAsset/Generated/Assets.swift index 23d724d6..41369d7d 100644 --- a/MastodonSDK/Sources/MastodonAsset/Generated/Assets.swift +++ b/MastodonSDK/Sources/MastodonAsset/Generated/Assets.swift @@ -105,11 +105,11 @@ public enum Asset { public enum Scene { public enum Onboarding { public static let avatarPlaceholder = ImageAsset(name: "Scene/Onboarding/avatar.placeholder") + public static let background = ColorAsset(name: "Scene/Onboarding/background") public static let navigationBackButtonBackground = ColorAsset(name: "Scene/Onboarding/navigation.back.button.background") public static let navigationBackButtonBackgroundHighlighted = ColorAsset(name: "Scene/Onboarding/navigation.back.button.background.highlighted") public static let navigationNextButtonBackground = ColorAsset(name: "Scene/Onboarding/navigation.next.button.background") public static let navigationNextButtonBackgroundHighlighted = ColorAsset(name: "Scene/Onboarding/navigation.next.button.background.highlighted") - public static let onboardingBackground = ColorAsset(name: "Scene/Onboarding/onboarding.background") public static let searchBarBackground = ColorAsset(name: "Scene/Onboarding/search.bar.background") public static let textFieldBackground = ColorAsset(name: "Scene/Onboarding/textField.background") } @@ -128,6 +128,9 @@ public enum Asset { public static let background = ColorAsset(name: "Scene/Report/background") public static let reportBanner = ColorAsset(name: "Scene/Report/report.banner") } + public enum Setting { + public static let background = ColorAsset(name: "Scene/Setting/background") + } public enum Sidebar { public static let logo = ImageAsset(name: "Scene/Sidebar/logo") } diff --git a/MastodonSDK/Sources/MastodonUI/View/Content/NotificationView.swift b/MastodonSDK/Sources/MastodonUI/View/Content/NotificationView.swift index 99b2d69a..4c5e8aba 100644 --- a/MastodonSDK/Sources/MastodonUI/View/Content/NotificationView.swift +++ b/MastodonSDK/Sources/MastodonUI/View/Content/NotificationView.swift @@ -103,6 +103,7 @@ public final class NotificationView: UIView { public let statusView = StatusView() public let quoteStatusViewContainerView = UIView() + public let quoteBackgroundView = UIView() public let quoteStatusView = StatusView() public func prepareForReuse() { @@ -232,7 +233,6 @@ extension NotificationView { right: StatusView.containerLayoutMargin.right ) - let quoteBackgroundView = UIView() quoteBackgroundView.layoutMargins = UIEdgeInsets(top: 16, left: 0, bottom: 0, right: 0) quoteBackgroundView.translatesAutoresizingMaskIntoConstraints = false