From a1ffb23f0dfb37101f8f534ade596fd01e67f824 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Sun, 23 Apr 2023 14:01:51 -0400 Subject: [PATCH] Align link verification checkmark to link rather than screen edge Closes #368 --- Tusker/Views/Profile Header/ProfileFieldsView.swift | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Tusker/Views/Profile Header/ProfileFieldsView.swift b/Tusker/Views/Profile Header/ProfileFieldsView.swift index 73c31264..38f858ff 100644 --- a/Tusker/Views/Profile Header/ProfileFieldsView.swift +++ b/Tusker/Views/Profile Header/ProfileFieldsView.swift @@ -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)