Skip to content

[trello.com/c/IwfruyRT] Centered title in visible wallets cells. #839

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 30, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,16 @@ final class VisibleWalletsCheckmarkRowView: UIView {
stack.spacing = 6
return stack
}()


private lazy var verticalTitlesStack: UIStackView = {
let stack = UIStackView(arrangedSubviews: [titleLabel, horizontalStack])
stack.axis = .vertical
stack.alignment = .leading
stack.distribution = .fillProportionally
stack.spacing = 0
return stack
}()

var title: String? {
get { titleLabel.text }
set { titleLabel.text = newValue }
Expand Down Expand Up @@ -111,27 +120,21 @@ final class VisibleWalletsCheckmarkRowView: UIView {
logoImageView.snp.makeConstraints {
$0.size.equalTo(25)
$0.centerY.equalToSuperview()
$0.leading.equalToSuperview().inset(8)
$0.leading.equalToSuperview().inset(20)
}

addSubview(checkmarkView)
checkmarkView.snp.makeConstraints {
$0.size.equalTo(44)
$0.top.trailing.bottom.equalToSuperview().inset(2)
}

addSubview(titleLabel)
titleLabel.snp.makeConstraints {
$0.top.equalTo(checkmarkView)
addSubview(verticalTitlesStack)
verticalTitlesStack.snp.makeConstraints {
$0.centerY.equalTo(logoImageView.snp.centerY)
$0.leading.equalTo(logoImageView.snp.trailing).offset(8)
}

addSubview(horizontalStack)
horizontalStack.snp.makeConstraints {
$0.top.equalTo(titleLabel.snp.bottom).offset(2)
$0.leading.equalTo(titleLabel)
}


addSubview(balanceLabel)
balanceLabel.contentMode = .left
balanceLabel.snp.makeConstraints {
Expand All @@ -146,6 +149,7 @@ final class VisibleWalletsCheckmarkRowView: UIView {
private func makeTitleLabel() -> UILabel {
let label = UILabel()
label.font = .systemFont(ofSize: 15, weight: .regular)
label.accessibilityIdentifier = "VisibleWalletsCheckmarkRowView.titleLabel"
return label
}

Expand All @@ -154,6 +158,7 @@ private func makeSubtitleLabel() -> UILabel {
let label = UILabel()
label.font = .preferredFont(forTextStyle: .caption1)
label.contentMode = .left
label.accessibilityIdentifier = "VisibleWalletsCheckmarkRowView.subtitleLabel"
return label
}

Expand All @@ -163,12 +168,14 @@ private func makeCaptionLabel() -> UILabel {
label.font = .systemFont(ofSize: 12, weight: .regular)
label.contentMode = .left
label.textColor = .lightGray
label.accessibilityIdentifier = "VisibleWalletsCheckmarkRowView.captionLabel"
return label
}

@MainActor
private func makeAdditionalLabel() -> UILabel {
let label = UILabel()
label.font = .systemFont(ofSize: 15, weight: .regular)
label.accessibilityIdentifier = "VisibleWalletsCheckmarkRowView.additionalLabel"
return label
}
Loading