chore: Fix hashtag follow button style
This commit is contained in:
parent
324e782fd5
commit
6c2fabaa03
|
@ -157,18 +157,10 @@ extension HashtagTimelineHeaderView {
|
||||||
|
|
||||||
followButton.backgroundColor = entity.following == true ? Asset.Colors.Button.tagUnfollow.color : Asset.Colors.Button.tagFollow.color
|
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(
|
followButton.setTitleColor(
|
||||||
entity.following == true ? Asset.Colors.Button.tagFollow.color : Asset.Colors.Button.tagUnfollow.color,
|
entity.following == true ? Asset.Colors.Button.tagFollow.color : Asset.Colors.Button.tagUnfollow.color,
|
||||||
for: .normal
|
for: .normal
|
||||||
)
|
)
|
||||||
}
|
|
||||||
|
|
||||||
postCountLabel.text = String(entity.postCount)
|
postCountLabel.text = String(entity.postCount)
|
||||||
participantsLabel.text = String(entity.participantsCount)
|
participantsLabel.text = String(entity.participantsCount)
|
||||||
|
|
|
@ -22,8 +22,17 @@ class HashtagTimelineHeaderViewActionButton: RoundedEdgesButton {
|
||||||
public override func layoutSubviews() {
|
public override func layoutSubviews() {
|
||||||
super.layoutSubviews()
|
super.layoutSubviews()
|
||||||
|
|
||||||
|
let shadowColor: UIColor = {
|
||||||
|
switch traitCollection.userInterfaceStyle {
|
||||||
|
case .dark:
|
||||||
|
return .darkGray
|
||||||
|
default:
|
||||||
|
return .lightGray
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
layer.setupShadow(
|
layer.setupShadow(
|
||||||
color: .lightGray,
|
color: shadowColor,
|
||||||
alpha: 1,
|
alpha: 1,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 1,
|
y: 1,
|
||||||
|
|
|
@ -22,10 +22,10 @@
|
||||||
"color" : {
|
"color" : {
|
||||||
"color-space" : "srgb",
|
"color-space" : "srgb",
|
||||||
"components" : {
|
"components" : {
|
||||||
"alpha" : "0.700",
|
"alpha" : "1.000",
|
||||||
"blue" : "0x38",
|
"blue" : "0xFF",
|
||||||
"green" : "0x29",
|
"green" : "0xFF",
|
||||||
"red" : "0x2B"
|
"red" : "0xFF"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"idiom" : "universal"
|
"idiom" : "universal"
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
"color" : {
|
"color" : {
|
||||||
"color-space" : "srgb",
|
"color-space" : "srgb",
|
||||||
"components" : {
|
"components" : {
|
||||||
"alpha" : "0.250",
|
"alpha" : "1.000",
|
||||||
"blue" : "0x38",
|
"blue" : "0x38",
|
||||||
"green" : "0x29",
|
"green" : "0x29",
|
||||||
"red" : "0x2B"
|
"red" : "0x2B"
|
||||||
|
|
Loading…
Reference in New Issue