fix: set Avatar border color based on theme

This commit is contained in:
Peter Minarik 2022-12-25 16:57:14 +01:00
parent c1f19d1f27
commit fd964c7b3a
No known key found for this signature in database
GPG Key ID: 7CBCECB768860C82
1 changed files with 1 additions and 2 deletions

View File

@ -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?) {