Merge pull request #877 from j-f1/username-align

Left-align the username in the profile header
This commit is contained in:
Marcus Kida 2023-01-12 10:24:03 +01:00 committed by GitHub
commit 412d9b6fc8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -187,6 +187,8 @@ final class ProfileHeaderView: UIView {
button.titleLabel?.font = UIFontMetrics(forTextStyle: .callout).scaledFont(for: .systemFont(ofSize: 16, weight: .regular)) button.titleLabel?.font = UIFontMetrics(forTextStyle: .callout).scaledFont(for: .systemFont(ofSize: 16, weight: .regular))
button.titleLabel?.adjustsFontSizeToFitWidth = true button.titleLabel?.adjustsFontSizeToFitWidth = true
button.titleLabel?.minimumScaleFactor = 0.5 button.titleLabel?.minimumScaleFactor = 0.5
button.titleLabel?.textAlignment = .natural
button.contentHorizontalAlignment = .leading
button.setTitleColor(Asset.Colors.Label.secondary.color, for: .normal) button.setTitleColor(Asset.Colors.Label.secondary.color, for: .normal)
button.menu = usernameButtonMenu button.menu = usernameButtonMenu
button.showsMenuAsPrimaryAction = true button.showsMenuAsPrimaryAction = true