Align link verification checkmark to link rather than screen edge
Closes #368
This commit is contained in:
parent
ea5afeeb88
commit
a1ffb23f0d
|
@ -201,6 +201,7 @@ private class ProfileFieldValueView: UIView {
|
||||||
|
|
||||||
if field.verifiedAt != nil {
|
if field.verifiedAt != nil {
|
||||||
var config = UIButton.Configuration.plain()
|
var config = UIButton.Configuration.plain()
|
||||||
|
config.preferredSymbolConfigurationForImage = UIImage.SymbolConfiguration(scale: .medium)
|
||||||
config.image = UIImage(systemName: "checkmark")
|
config.image = UIImage(systemName: "checkmark")
|
||||||
config.baseForegroundColor = .systemGreen
|
config.baseForegroundColor = .systemGreen
|
||||||
let icon = UIButton(configuration: config)
|
let icon = UIButton(configuration: config)
|
||||||
|
@ -211,10 +212,10 @@ private class ProfileFieldValueView: UIView {
|
||||||
icon.isPointerInteractionEnabled = true
|
icon.isPointerInteractionEnabled = true
|
||||||
icon.accessibilityLabel = "Verified link"
|
icon.accessibilityLabel = "Verified link"
|
||||||
addSubview(icon)
|
addSubview(icon)
|
||||||
textViewTrailingConstraint = textView.trailingAnchor.constraint(equalTo: icon.leadingAnchor, constant: -4)
|
textViewTrailingConstraint = textView.trailingAnchor.constraint(equalTo: icon.leadingAnchor)
|
||||||
NSLayoutConstraint.activate([
|
NSLayoutConstraint.activate([
|
||||||
icon.centerYAnchor.constraint(equalTo: centerYAnchor),
|
icon.lastBaselineAnchor.constraint(equalTo: textView.lastBaselineAnchor),
|
||||||
icon.trailingAnchor.constraint(equalTo: trailingAnchor),
|
icon.trailingAnchor.constraint(lessThanOrEqualTo: trailingAnchor),
|
||||||
])
|
])
|
||||||
} else {
|
} else {
|
||||||
textViewTrailingConstraint = textView.trailingAnchor.constraint(equalTo: trailingAnchor)
|
textViewTrailingConstraint = textView.trailingAnchor.constraint(equalTo: trailingAnchor)
|
||||||
|
|
Loading…
Reference in New Issue