forked from shadowfacts/Tusker
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 {
|
||||
var config = UIButton.Configuration.plain()
|
||||
config.preferredSymbolConfigurationForImage = UIImage.SymbolConfiguration(scale: .medium)
|
||||
config.image = UIImage(systemName: "checkmark")
|
||||
config.baseForegroundColor = .systemGreen
|
||||
let icon = UIButton(configuration: config)
|
||||
|
@ -211,10 +212,10 @@ private class ProfileFieldValueView: UIView {
|
|||
icon.isPointerInteractionEnabled = true
|
||||
icon.accessibilityLabel = "Verified link"
|
||||
addSubview(icon)
|
||||
textViewTrailingConstraint = textView.trailingAnchor.constraint(equalTo: icon.leadingAnchor, constant: -4)
|
||||
textViewTrailingConstraint = textView.trailingAnchor.constraint(equalTo: icon.leadingAnchor)
|
||||
NSLayoutConstraint.activate([
|
||||
icon.centerYAnchor.constraint(equalTo: centerYAnchor),
|
||||
icon.trailingAnchor.constraint(equalTo: trailingAnchor),
|
||||
icon.lastBaselineAnchor.constraint(equalTo: textView.lastBaselineAnchor),
|
||||
icon.trailingAnchor.constraint(lessThanOrEqualTo: trailingAnchor),
|
||||
])
|
||||
} else {
|
||||
textViewTrailingConstraint = textView.trailingAnchor.constraint(equalTo: trailingAnchor)
|
||||
|
|
Loading…
Reference in New Issue