From cc3826dd1f97dce4925bb846158876ab7cd4af08 Mon Sep 17 00:00:00 2001 From: CMK Date: Fri, 18 Feb 2022 18:55:52 +0800 Subject: [PATCH] fix: profile segmented bar use wrong tint color when force Dark Mode issue --- .../Profile/Header/ProfileHeaderViewController.swift | 5 ++++- .../Colors/Label/secondary.colorset/Contents.json | 12 ++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Mastodon/Scene/Profile/Header/ProfileHeaderViewController.swift b/Mastodon/Scene/Profile/Header/ProfileHeaderViewController.swift index 9c9597224..de6ad5415 100644 --- a/Mastodon/Scene/Profile/Header/ProfileHeaderViewController.swift +++ b/Mastodon/Scene/Profile/Header/ProfileHeaderViewController.swift @@ -61,12 +61,15 @@ final class ProfileHeaderViewController: UIViewController { case .dark: // Asset.Colors.Label.primary.color button.selectedTintColor = UIColor(red: 238.0/255.0, green: 238.0/255.0, blue: 238.0/255.0, alpha: 1.0) + // Asset.Colors.Label.secondary.color + button.tintColor = UIColor(red: 151.0/255.0, green: 157.0/255.0, blue: 173.0/255.0, alpha: 1.0) default: // Asset.Colors.Label.primary.color button.selectedTintColor = UIColor(red: 40.0/255.0, green: 44.0/255.0, blue: 55.0/255.0, alpha: 1.0) + // Asset.Colors.Label.secondary.color + button.tintColor = UIColor(red: 60.0/255.0, green: 60.0/255.0, blue: 67.0/255.0, alpha: 0.6) } - button.tintColor = .secondaryLabel // UIColor(red: 60.0/255.0, green: 60.0/255.0, blue: 67.0/255.0, alpha: 1.0) button.backgroundColor = .clear } } 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 9d73ead03..cd123376b 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" : "0.600", - "blue" : "0.263", - "green" : "0.235", - "red" : "0.235" + "blue" : "67", + "green" : "60", + "red" : "60" } }, "idiom" : "universal" @@ -23,9 +23,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "0.678", - "green" : "0.616", - "red" : "0.592" + "blue" : "173", + "green" : "157", + "red" : "151" } }, "idiom" : "universal"