diff --git a/Mastodon.xcodeproj/xcuserdata/mainasuk.xcuserdatad/xcschemes/xcschememanagement.plist b/Mastodon.xcodeproj/xcuserdata/mainasuk.xcuserdatad/xcschemes/xcschememanagement.plist index 6817fbe8e..63710a42a 100644 --- a/Mastodon.xcodeproj/xcuserdata/mainasuk.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/Mastodon.xcodeproj/xcuserdata/mainasuk.xcuserdatad/xcschemes/xcschememanagement.plist @@ -114,7 +114,7 @@ MastodonIntent.xcscheme_^#shared#^_ orderHint - 23 + 22 MastodonIntents.xcscheme_^#shared#^_ @@ -129,12 +129,12 @@ NotificationService.xcscheme_^#shared#^_ orderHint - 22 + 24 ShareActionExtension.xcscheme_^#shared#^_ orderHint - 24 + 23 SuppressBuildableAutocreation diff --git a/Mastodon/Coordinator/SceneCoordinator.swift b/Mastodon/Coordinator/SceneCoordinator.swift index 4a4b43407..4491d383a 100644 --- a/Mastodon/Coordinator/SceneCoordinator.swift +++ b/Mastodon/Coordinator/SceneCoordinator.swift @@ -496,7 +496,7 @@ private extension SceneCoordinator { } let _viewController = SFSafariViewController(url: url) _viewController.preferredBarTintColor = ThemeService.shared.currentTheme.value.navigationBarBackgroundColor - _viewController.preferredControlTintColor = Asset.Colors.brandBlue.color + _viewController.preferredControlTintColor = Asset.Colors.brand.color viewController = _viewController case .alertController(let alertController): diff --git a/Mastodon/Extension/MastodonSDK/Mastodon+Entity+Notification+Type.swift b/Mastodon/Extension/MastodonSDK/Mastodon+Entity+Notification+Type.swift index 2c5a2e46e..2ffd5bcc3 100644 --- a/Mastodon/Extension/MastodonSDK/Mastodon+Entity+Notification+Type.swift +++ b/Mastodon/Extension/MastodonSDK/Mastodon+Entity+Notification+Type.swift @@ -17,7 +17,7 @@ extension Mastodon.Entity.Notification.NotificationType { var color: UIColor switch self { case .follow: - color = Asset.Colors.brandBlue.color + color = Asset.Colors.brand.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.brandBlue.color + color = Asset.Colors.brand.color case .followRequest: - color = Asset.Colors.brandBlue.color + color = Asset.Colors.brand.color default: color = .clear } diff --git a/Mastodon/Extension/UITableView.swift b/Mastodon/Extension/UITableView.swift index 74bdd2ed4..9e2260e07 100644 --- a/Mastodon/Extension/UITableView.swift +++ b/Mastodon/Extension/UITableView.swift @@ -35,7 +35,7 @@ extension UITableView { let backgroundColor = cell.backgroundColor UIView.animate(withDuration: 0.3) { - cell.backgroundColor = Asset.Colors.brandBlue.color.withAlphaComponent(0.5) + cell.backgroundColor = Asset.Colors.brand.color.withAlphaComponent(0.5) DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { UIView.animate(withDuration: 0.3) { cell.backgroundColor = backgroundColor diff --git a/Mastodon/Scene/Compose/CollectionViewCell/ComposeStatusPollExpiresOptionCollectionViewCell.swift b/Mastodon/Scene/Compose/CollectionViewCell/ComposeStatusPollExpiresOptionCollectionViewCell.swift index 7d976bfdf..8a00fccde 100644 --- a/Mastodon/Scene/Compose/CollectionViewCell/ComposeStatusPollExpiresOptionCollectionViewCell.swift +++ b/Mastodon/Scene/Compose/CollectionViewCell/ComposeStatusPollExpiresOptionCollectionViewCell.swift @@ -25,7 +25,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.brandBlue.color, for: .normal) + button.setTitleColor(Asset.Colors.brand.color, for: .normal) return button }() diff --git a/Mastodon/Scene/Compose/CollectionViewCell/ComposeStatusPollOptionAppendEntryCollectionViewCell.swift b/Mastodon/Scene/Compose/CollectionViewCell/ComposeStatusPollOptionAppendEntryCollectionViewCell.swift index e2702e7c6..336d109c9 100644 --- a/Mastodon/Scene/Compose/CollectionViewCell/ComposeStatusPollOptionAppendEntryCollectionViewCell.swift +++ b/Mastodon/Scene/Compose/CollectionViewCell/ComposeStatusPollOptionAppendEntryCollectionViewCell.swift @@ -32,7 +32,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.brandBlue.color.withAlphaComponent(0.5) : Asset.Colors.brandBlue.color + pollOptionView.plusCircleImageView.tintColor = isHighlighted ? Asset.Colors.brand.color.withAlphaComponent(0.5) : Asset.Colors.brand.color } } diff --git a/Mastodon/Scene/Compose/TableViewCell/ComposeStatusContentTableViewCell.swift b/Mastodon/Scene/Compose/TableViewCell/ComposeStatusContentTableViewCell.swift index 4c3d37169..814d79c0e 100644 --- a/Mastodon/Scene/Compose/TableViewCell/ComposeStatusContentTableViewCell.swift +++ b/Mastodon/Scene/Compose/TableViewCell/ComposeStatusContentTableViewCell.swift @@ -60,7 +60,7 @@ final class ComposeStatusContentTableViewCell: UITableViewCell { ] metaText.linkAttributes = [ .font: UIFontMetrics(forTextStyle: .body).scaledFont(for: .systemFont(ofSize: 17, weight: .semibold)), - .foregroundColor: Asset.Colors.brandBlue.color, + .foregroundColor: Asset.Colors.brand.color, ] return metaText }() diff --git a/Mastodon/Scene/HomeTimeline/HomeTimelineViewController.swift b/Mastodon/Scene/HomeTimeline/HomeTimelineViewController.swift index 871d47c28..24b96f265 100644 --- a/Mastodon/Scene/HomeTimeline/HomeTimelineViewController.swift +++ b/Mastodon/Scene/HomeTimeline/HomeTimelineViewController.swift @@ -339,7 +339,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.brandBlue.color, for: .normal) + button.setTitleColor(Asset.Colors.brand.color, for: .normal) button.addTarget(self, action: #selector(HomeTimelineViewController.manuallySearchButtonPressed(_:)), for: .touchUpInside) return button }() diff --git a/Mastodon/Scene/HomeTimeline/View/HomeTimelineNavigationBarTitleView.swift b/Mastodon/Scene/HomeTimeline/View/HomeTimelineNavigationBarTitleView.swift index 016884f72..400b4ee98 100644 --- a/Mastodon/Scene/HomeTimeline/View/HomeTimelineNavigationBarTitleView.swift +++ b/Mastodon/Scene/HomeTimeline/View/HomeTimelineNavigationBarTitleView.swift @@ -114,7 +114,7 @@ extension HomeTimelineNavigationBarTitleView { configureButton( title: L10n.Scene.HomeTimeline.NavigationBarState.newPosts, textColor: .white, - backgroundColor: Asset.Colors.brandBlue.color + backgroundColor: Asset.Colors.brand.color ) button.isHidden = false button.accessibilityLabel = L10n.Scene.HomeTimeline.NavigationBarState.newPosts diff --git a/Mastodon/Scene/Onboarding/PickServer/View/PickServerCategoryView.swift b/Mastodon/Scene/Onboarding/PickServer/View/PickServerCategoryView.swift index 822085863..784559480 100644 --- a/Mastodon/Scene/Onboarding/PickServer/View/PickServerCategoryView.swift +++ b/Mastodon/Scene/Onboarding/PickServer/View/PickServerCategoryView.swift @@ -65,7 +65,7 @@ extension PickServerCategoryView { highlightedIndicatorView.translatesAutoresizingMaskIntoConstraints = false container.addArrangedSubview(highlightedIndicatorView) NSLayoutConstraint.activate([ - highlightedIndicatorView.heightAnchor.constraint(equalToConstant: UIView.separatorLineHeight(of: self) * 3).priority(.required - 1), + highlightedIndicatorView.heightAnchor.constraint(equalToConstant: 3).priority(.required - 1), ]) titleLabel.setContentHuggingPriority(.required - 1, for: .vertical) } diff --git a/Mastodon/Scene/Profile/Header/View/ProfileHeaderView.swift b/Mastodon/Scene/Profile/Header/View/ProfileHeaderView.swift index 7257333d0..96aa91623 100644 --- a/Mastodon/Scene/Profile/Header/View/ProfileHeaderView.swift +++ b/Mastodon/Scene/Profile/Header/View/ProfileHeaderView.swift @@ -204,7 +204,7 @@ final class ProfileHeaderView: UIView { ] metaText.linkAttributes = [ .font: UIFont.preferredFont(forTextStyle: .body), - .foregroundColor: Asset.Colors.brandBlue.color, + .foregroundColor: Asset.Colors.brand.color, ] return metaText }() diff --git a/Mastodon/Scene/Root/Sidebar/View/SidebarAddAccountCollectionViewCell.swift b/Mastodon/Scene/Root/Sidebar/View/SidebarAddAccountCollectionViewCell.swift index da3793a9c..cd8ae1d57 100644 --- a/Mastodon/Scene/Root/Sidebar/View/SidebarAddAccountCollectionViewCell.swift +++ b/Mastodon/Scene/Root/Sidebar/View/SidebarAddAccountCollectionViewCell.swift @@ -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.brandBlue.color + newBackgroundConfiguration.backgroundColor = Asset.Colors.brand.color } if state.isHighlighted { newBackgroundConfiguration.backgroundColorTransformer = .init { $0.withAlphaComponent(0.8) } diff --git a/Mastodon/Scene/Search/Search/View/SearchRecommendCollectionHeader.swift b/Mastodon/Scene/Search/Search/View/SearchRecommendCollectionHeader.swift index 0b7495cc8..19d2e9d4b 100644 --- a/Mastodon/Scene/Search/Search/View/SearchRecommendCollectionHeader.swift +++ b/Mastodon/Scene/Search/Search/View/SearchRecommendCollectionHeader.swift @@ -31,7 +31,7 @@ class SearchRecommendCollectionHeader: UIView { let seeAllButton: HighlightDimmableButton = { let button = HighlightDimmableButton(type: .custom) - button.setTitleColor(Asset.Colors.brandBlue.color, for: .normal) + button.setTitleColor(Asset.Colors.brand.color, for: .normal) button.setTitle(L10n.Scene.Search.Recommend.buttonText, for: .normal) button.titleLabel?.adjustsFontSizeToFitWidth = true button.titleLabel?.minimumScaleFactor = 0.8 diff --git a/Mastodon/Scene/Search/SearchDetail/SearchDetailViewController.swift b/Mastodon/Scene/Search/SearchDetail/SearchDetailViewController.swift index ecc1c0c02..701dc4fa6 100644 --- a/Mastodon/Scene/Search/SearchDetail/SearchDetailViewController.swift +++ b/Mastodon/Scene/Search/SearchDetail/SearchDetailViewController.swift @@ -306,7 +306,7 @@ extension SearchDetailViewController { private func setupBackgroundColor(theme: Theme) { navigationBarBackgroundView.backgroundColor = theme.navigationBarBackgroundColor - navigationBar.tintColor = Asset.Colors.brandBlue.color + navigationBar.tintColor = Asset.Colors.brand.color } } diff --git a/Mastodon/Scene/Search/SearchDetail/SearchHistory/View/SearchHistoryTableHeaderView.swift b/Mastodon/Scene/Search/SearchDetail/SearchHistory/View/SearchHistoryTableHeaderView.swift index fc41bdf27..5de09f802 100644 --- a/Mastodon/Scene/Search/SearchDetail/SearchHistory/View/SearchHistoryTableHeaderView.swift +++ b/Mastodon/Scene/Search/SearchDetail/SearchHistory/View/SearchHistoryTableHeaderView.swift @@ -34,7 +34,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.brandBlue.color, for: .normal) + button.setTitleColor(Asset.Colors.brand.color, for: .normal) button.setTitle(L10n.Scene.Search.Searching.clear, for: .normal) return button }() diff --git a/Mastodon/Scene/Share/View/Content/NavigationBarProgressView.swift b/Mastodon/Scene/Share/View/Content/NavigationBarProgressView.swift index efa8b53a5..e2b7a4d01 100644 --- a/Mastodon/Scene/Share/View/Content/NavigationBarProgressView.swift +++ b/Mastodon/Scene/Share/View/Content/NavigationBarProgressView.swift @@ -15,7 +15,7 @@ class NavigationBarProgressView: UIView { let sliderView: UIView = { let view = UIView() - view.backgroundColor = Asset.Colors.brandBlue.color + view.backgroundColor = Asset.Colors.brand.color view.translatesAutoresizingMaskIntoConstraints = false return view }() diff --git a/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/Label/primary.colorset/Contents.json b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/Label/primary.colorset/Contents.json index 0c0c8af04..3a05fc4fe 100644 --- a/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/Label/primary.colorset/Contents.json +++ b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/Label/primary.colorset/Contents.json @@ -5,9 +5,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "55", - "green" : "44", - "red" : "40" + "blue" : "0x38", + "green" : "0x29", + "red" : "0x2B" } }, "idiom" : "universal" diff --git a/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/Label/primary.reverse.colorset/Contents.json b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/Label/primary.reverse.colorset/Contents.json index 8f42a585a..751d5998f 100644 --- a/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/Label/primary.reverse.colorset/Contents.json +++ b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/Label/primary.reverse.colorset/Contents.json @@ -23,9 +23,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "0.216", - "green" : "0.173", - "red" : "0.157" + "blue" : "0x38", + "green" : "0x29", + "red" : "0x2B" } }, "idiom" : "universal" diff --git a/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/Label/secondary.colorset/Contents.json b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/Label/secondary.colorset/Contents.json index b23080b6b..6488a4e8c 100644 --- a/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/Label/secondary.colorset/Contents.json +++ b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/Label/secondary.colorset/Contents.json @@ -5,9 +5,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "133", - "green" : "112", - "red" : "102" + "blue" : "0x85", + "green" : "0x66", + "red" : "0x69" } }, "idiom" : "universal" diff --git a/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/Primary/300.colorset/Contents.json b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/Primary/300.colorset/Contents.json new file mode 100644 index 000000000..e1a0ce662 --- /dev/null +++ b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/Primary/300.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFF", + "green" : "0xC2", + "red" : "0xC2" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "1.000", + "green" : "0.761", + "red" : "0.761" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/Primary/700.colorset/Contents.json b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/Primary/700.colorset/Contents.json new file mode 100644 index 000000000..b9b9d31dd --- /dev/null +++ b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/Primary/700.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0.733", + "green" : "0.110", + "red" : "0.263" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0.733", + "green" : "0.110", + "red" : "0.263" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/Primary/Contents.json b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/Primary/Contents.json new file mode 100644 index 000000000..6e965652d --- /dev/null +++ b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/Primary/Contents.json @@ -0,0 +1,9 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "provides-namespace" : true + } +} diff --git a/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/brand.colorset/Contents.json b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/brand.colorset/Contents.json new file mode 100644 index 000000000..39a9bd1ef --- /dev/null +++ b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/brand.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xBB", + "green" : "0x1C", + "red" : "0x43" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0.733", + "green" : "0.110", + "red" : "0.263" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/deprecated/Contents.json b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/deprecated/Contents.json new file mode 100644 index 000000000..6e965652d --- /dev/null +++ b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/deprecated/Contents.json @@ -0,0 +1,9 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "provides-namespace" : true + } +} diff --git a/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/brand.blue.colorset/Contents.json b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/deprecated/brand.blue.colorset/Contents.json similarity index 100% rename from MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/brand.blue.colorset/Contents.json rename to MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/deprecated/brand.blue.colorset/Contents.json diff --git a/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/brand.blue.darken.20.colorset/Contents.json b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/deprecated/brand.blue.darken.20.colorset/Contents.json similarity index 100% rename from MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/brand.blue.darken.20.colorset/Contents.json rename to MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/deprecated/brand.blue.darken.20.colorset/Contents.json diff --git a/MastodonSDK/Sources/MastodonAsset/Generated/Assets.swift b/MastodonSDK/Sources/MastodonAsset/Generated/Assets.swift index b594f9209..0cd4e8bd8 100644 --- a/MastodonSDK/Sources/MastodonAsset/Generated/Assets.swift +++ b/MastodonSDK/Sources/MastodonAsset/Generated/Assets.swift @@ -46,6 +46,10 @@ public enum Asset { public static let disabled = ColorAsset(name: "Colors/Button/disabled") public static let inactive = ColorAsset(name: "Colors/Button/inactive") } + public enum Deprecated { + public static let brandBlue = ColorAsset(name: "Colors/Deprecated/brand.blue") + public static let brandBlueDarken20 = ColorAsset(name: "Colors/Deprecated/brand.blue.darken.20") + } public enum Icon { public static let plus = ColorAsset(name: "Colors/Icon/plus") } @@ -63,6 +67,10 @@ public enum Asset { public enum Poll { public static let disabled = ColorAsset(name: "Colors/Poll/disabled") } + public enum Primary { + public static let _300 = ColorAsset(name: "Colors/Primary/300") + public static let _700 = ColorAsset(name: "Colors/Primary/700") + } public enum Shadow { public static let searchCard = ColorAsset(name: "Colors/Shadow/SearchCard") } @@ -77,8 +85,7 @@ 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 brandBlue = ColorAsset(name: "Colors/brand.blue") - public static let brandBlueDarken20 = ColorAsset(name: "Colors/brand.blue.darken.20") + 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 static let disabled = ColorAsset(name: "Colors/disabled") diff --git a/MastodonSDK/Sources/MastodonUI/Extension/MetaLabel.swift b/MastodonSDK/Sources/MastodonUI/Extension/MetaLabel.swift index 41fbfe40c..22c05a969 100644 --- a/MastodonSDK/Sources/MastodonUI/Extension/MetaLabel.swift +++ b/MastodonSDK/Sources/MastodonUI/Extension/MetaLabel.swift @@ -118,7 +118,7 @@ extension MetaLabel { case .autoCompletion: font = UIFontMetrics(forTextStyle: .headline).scaledFont(for: .systemFont(ofSize: 17, weight: .semibold), maximumPointSize: 22) - textColor = Asset.Colors.brandBlue.color + textColor = Asset.Colors.brand.color case .accountListName: font = UIFontMetrics(forTextStyle: .headline).scaledFont(for: .systemFont(ofSize: 17, weight: .regular), maximumPointSize: 22) @@ -146,7 +146,7 @@ extension MetaLabel { ] linkAttributes = [ .font: font, - .foregroundColor: Asset.Colors.brandBlue.color + .foregroundColor: Asset.Colors.brand.color ] } diff --git a/MastodonSDK/Sources/MastodonUI/View/Content/PollOptionView+ViewModel.swift b/MastodonSDK/Sources/MastodonUI/View/Content/PollOptionView+ViewModel.swift index e25e5d0a8..576e92cac 100644 --- a/MastodonSDK/Sources/MastodonUI/View/Content/PollOptionView+ViewModel.swift +++ b/MastodonSDK/Sources/MastodonUI/View/Content/PollOptionView+ViewModel.swift @@ -47,8 +47,8 @@ extension PollOptionView { @Published public var voteState: VoteState = .hidden @Published public var roundedBackgroundViewColor: UIColor = .clear - @Published public var primaryStripProgressViewTintColor: UIColor = Asset.Colors.brandBlue.color - @Published public var secondaryStripProgressViewTintColor: UIColor = Asset.Colors.brandBlue.color.withAlphaComponent(0.5) + @Published public var primaryStripProgressViewTintColor: UIColor = Asset.Colors.brand.color + @Published public var secondaryStripProgressViewTintColor: UIColor = Asset.Colors.brand.color.withAlphaComponent(0.5) @Published public var groupedAccessibilityLabel = "" diff --git a/MastodonSDK/Sources/MastodonUI/View/Content/PollOptionView.swift b/MastodonSDK/Sources/MastodonUI/View/Content/PollOptionView.swift index df000233c..fcdd0586f 100644 --- a/MastodonSDK/Sources/MastodonUI/View/Content/PollOptionView.swift +++ b/MastodonSDK/Sources/MastodonUI/View/Content/PollOptionView.swift @@ -32,7 +32,7 @@ public final class PollOptionView: UIView { public let roundedBackgroundView = UIView() public let voteProgressStripView: StripProgressView = { let view = StripProgressView() - view.tintColor = Asset.Colors.brandBlue.color + view.tintColor = Asset.Colors.brand.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.brandBlue.color + imageView.tintColor = Asset.Colors.brand.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.brandBlue.color + imageView.tintColor = Asset.Colors.brand.color return imageView }() diff --git a/MastodonSDK/Sources/MastodonUI/View/Content/ProfileCardView.swift b/MastodonSDK/Sources/MastodonUI/View/Content/ProfileCardView.swift index 0572cc0f6..b93d44b73 100644 --- a/MastodonSDK/Sources/MastodonUI/View/Content/ProfileCardView.swift +++ b/MastodonSDK/Sources/MastodonUI/View/Content/ProfileCardView.swift @@ -78,7 +78,7 @@ public final class ProfileCardView: UIView { ] metaText.linkAttributes = [ .font: UIFont.preferredFont(forTextStyle: .body), - .foregroundColor: Asset.Colors.brandBlue.color, + .foregroundColor: Asset.Colors.brand.color, ] return metaText }() diff --git a/MastodonSDK/Sources/MastodonUI/View/Content/StatusView.swift b/MastodonSDK/Sources/MastodonUI/View/Content/StatusView.swift index bdcbd473e..4c983df34 100644 --- a/MastodonSDK/Sources/MastodonUI/View/Content/StatusView.swift +++ b/MastodonSDK/Sources/MastodonUI/View/Content/StatusView.swift @@ -147,8 +147,8 @@ public final class StatusView: UIView { .foregroundColor: Asset.Colors.Label.primary.color, ] metaText.linkAttributes = [ - .font: UIFontMetrics(forTextStyle: .body).scaledFont(for: .systemFont(ofSize: 17, weight: .semibold)), - .foregroundColor: Asset.Colors.brandBlue.color, + .font: UIFontMetrics(forTextStyle: .body).scaledFont(for: .systemFont(ofSize: 17, weight: .regular)), + .foregroundColor: Asset.Colors.brand.color, ] return metaText }() @@ -203,8 +203,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.brandBlue.color, for: .normal) - button.setTitleColor(Asset.Colors.brandBlue.color.withAlphaComponent(0.8), for: .highlighted) + button.setTitleColor(Asset.Colors.brand.color, for: .normal) + button.setTitleColor(Asset.Colors.brand.color.withAlphaComponent(0.8), for: .highlighted) button.setTitleColor(Asset.Colors.Button.disabled.color, for: .disabled) button.isEnabled = false return button diff --git a/MastodonSDK/Sources/MastodonUI/View/Control/LineChartView.swift b/MastodonSDK/Sources/MastodonUI/View/Control/LineChartView.swift index c90b59f0e..833ee76a5 100644 --- a/MastodonSDK/Sources/MastodonUI/View/Control/LineChartView.swift +++ b/MastodonSDK/Sources/MastodonUI/View/Control/LineChartView.swift @@ -40,8 +40,8 @@ extension LineChartView { layer.addSublayer(gradientLayer) gradientLayer.colors = [ - Asset.Colors.brandBlue.color.withAlphaComponent(0.5).cgColor, // set the same alpha to fill - Asset.Colors.brandBlue.color.withAlphaComponent(0.5).cgColor, + Asset.Colors.Primary._300.color.withAlphaComponent(0.5).cgColor, // set the same alpha to fill + Asset.Colors.Primary._300.color.withAlphaComponent(0.5).cgColor, ] gradientLayer.startPoint = CGPoint(x: 0.5, y: 0) gradientLayer.endPoint = CGPoint(x: 0.5, y: 1) @@ -91,7 +91,7 @@ extension LineChartView { } lineShapeLayer.lineWidth = 1 - lineShapeLayer.strokeColor = Asset.Colors.brandBlue.color.cgColor + lineShapeLayer.strokeColor = Asset.Colors.Primary._700.color.cgColor lineShapeLayer.fillColor = UIColor.clear.cgColor lineShapeLayer.lineJoin = .round lineShapeLayer.lineCap = .round @@ -103,7 +103,7 @@ extension LineChartView { maskPath.close() let maskLayer = CAShapeLayer() maskLayer.path = maskPath.cgPath - maskLayer.fillColor = Asset.Colors.brandBlue.color.cgColor + maskLayer.fillColor = Asset.Colors.brand.color.cgColor maskLayer.strokeColor = UIColor.clear.cgColor maskLayer.lineWidth = 0.0 gradientLayer.mask = maskLayer diff --git a/ShareActionExtension/Scene/ShareViewController.swift b/ShareActionExtension/Scene/ShareViewController.swift index 622e0106b..542fce6d5 100644 --- a/ShareActionExtension/Scene/ShareViewController.swift +++ b/ShareActionExtension/Scene/ShareViewController.swift @@ -25,8 +25,8 @@ class ShareViewController: UIViewController { 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.brandBlue.color), for: .normal) - button.setBackgroundImage(.placeholder(color: Asset.Colors.brandBlue.color.withAlphaComponent(0.5)), for: .highlighted) + button.setBackgroundImage(.placeholder(color: Asset.Colors.brand.color), for: .normal) + button.setBackgroundImage(.placeholder(color: Asset.Colors.brand.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