fix: set Avatar border color based on theme
This commit is contained in:
parent
c1f19d1f27
commit
fd964c7b3a
|
@ -28,7 +28,6 @@ final class ProfileHeaderView: UIView {
|
||||||
|
|
||||||
static let avatarImageViewSize = CGSize(width: 98, height: 98)
|
static let avatarImageViewSize = CGSize(width: 98, height: 98)
|
||||||
static let avatarImageViewCornerRadius: CGFloat = 25
|
static let avatarImageViewCornerRadius: CGFloat = 25
|
||||||
static let avatarImageViewBorderColor = UIColor.white
|
|
||||||
static let avatarImageViewBorderWidth: CGFloat = 2
|
static let avatarImageViewBorderWidth: CGFloat = 2
|
||||||
static let friendshipActionButtonSize = CGSize(width: 108, height: 34)
|
static let friendshipActionButtonSize = CGSize(width: 108, height: 34)
|
||||||
static let bannerImageViewPlaceholderColor = UIColor.systemGray
|
static let bannerImageViewPlaceholderColor = UIColor.systemGray
|
||||||
|
@ -90,7 +89,6 @@ final class ProfileHeaderView: UIView {
|
||||||
view.layer.masksToBounds = true
|
view.layer.masksToBounds = true
|
||||||
view.layer.cornerRadius = ProfileHeaderView.avatarImageViewCornerRadius
|
view.layer.cornerRadius = ProfileHeaderView.avatarImageViewCornerRadius
|
||||||
view.layer.cornerCurve = .continuous
|
view.layer.cornerCurve = .continuous
|
||||||
view.layer.borderColor = ProfileHeaderView.avatarImageViewBorderColor.cgColor
|
|
||||||
view.layer.borderWidth = ProfileHeaderView.avatarImageViewBorderWidth
|
view.layer.borderWidth = ProfileHeaderView.avatarImageViewBorderWidth
|
||||||
return view
|
return view
|
||||||
}()
|
}()
|
||||||
|
@ -458,6 +456,7 @@ extension ProfileHeaderView {
|
||||||
private func setColors(from theme: Theme) {
|
private func setColors(from theme: Theme) {
|
||||||
backgroundColor = theme.systemBackgroundColor
|
backgroundColor = theme.systemBackgroundColor
|
||||||
avatarButton.backgroundColor = theme.secondarySystemBackgroundColor
|
avatarButton.backgroundColor = theme.secondarySystemBackgroundColor
|
||||||
|
avatarImageViewBackgroundView.layer.borderColor = theme.systemBackgroundColor.cgColor
|
||||||
}
|
}
|
||||||
|
|
||||||
override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
|
override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
|
||||||
|
|
Loading…
Reference in New Issue