chore: Fix hashtag follow button style

This commit is contained in:
Marcus Kida 2022-12-01 14:52:55 +01:00
parent 324e782fd5
commit 6c2fabaa03
No known key found for this signature in database
GPG Key ID: 19FF64E08013CA40
4 changed files with 19 additions and 18 deletions

View File

@ -157,18 +157,10 @@ extension HashtagTimelineHeaderView {
followButton.backgroundColor = entity.following == true ? Asset.Colors.Button.tagUnfollow.color : Asset.Colors.Button.tagFollow.color
switch traitCollection.userInterfaceStyle {
case .dark:
followButton.setTitleColor(
.lightGray,
for: .normal
)
default:
followButton.setTitleColor(
entity.following == true ? Asset.Colors.Button.tagFollow.color : Asset.Colors.Button.tagUnfollow.color,
for: .normal
)
}
followButton.setTitleColor(
entity.following == true ? Asset.Colors.Button.tagFollow.color : Asset.Colors.Button.tagUnfollow.color,
for: .normal
)
postCountLabel.text = String(entity.postCount)
participantsLabel.text = String(entity.participantsCount)

View File

@ -22,8 +22,17 @@ class HashtagTimelineHeaderViewActionButton: RoundedEdgesButton {
public override func layoutSubviews() {
super.layoutSubviews()
let shadowColor: UIColor = {
switch traitCollection.userInterfaceStyle {
case .dark:
return .darkGray
default:
return .lightGray
}
}()
layer.setupShadow(
color: .lightGray,
color: shadowColor,
alpha: 1,
x: 0,
y: 1,

View File

@ -22,10 +22,10 @@
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "0.700",
"blue" : "0x38",
"green" : "0x29",
"red" : "0x2B"
"alpha" : "1.000",
"blue" : "0xFF",
"green" : "0xFF",
"red" : "0xFF"
}
},
"idiom" : "universal"

View File

@ -22,7 +22,7 @@
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "0.250",
"alpha" : "1.000",
"blue" : "0x38",
"green" : "0x29",
"red" : "0x2B"