fix: author info UI layout issue
This commit is contained in:
parent
96c1488820
commit
07f3cc7a77
|
@ -53,6 +53,8 @@ extension ComposeTootContentTableViewCell {
|
||||||
])
|
])
|
||||||
statusView.statusContainerStackView.isHidden = true
|
statusView.statusContainerStackView.isHidden = true
|
||||||
statusView.actionToolbarContainer.isHidden = true
|
statusView.actionToolbarContainer.isHidden = true
|
||||||
|
statusView.nameTrialingDotLabel.isHidden = true
|
||||||
|
statusView.dateLabel.isHidden = true
|
||||||
|
|
||||||
textEditorView.translatesAutoresizingMaskIntoConstraints = false
|
textEditorView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
contentView.addSubview(textEditorView)
|
contentView.addSubview(textEditorView)
|
||||||
|
|
|
@ -71,6 +71,14 @@ final class StatusView: UIView {
|
||||||
return label
|
return label
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
let nameTrialingDotLabel: UILabel = {
|
||||||
|
let label = UILabel()
|
||||||
|
label.textColor = Asset.Colors.Label.secondary.color
|
||||||
|
label.font = .systemFont(ofSize: 17)
|
||||||
|
label.text = "·"
|
||||||
|
return label
|
||||||
|
}()
|
||||||
|
|
||||||
let usernameLabel: UILabel = {
|
let usernameLabel: UILabel = {
|
||||||
let label = UILabel()
|
let label = UILabel()
|
||||||
label.font = .systemFont(ofSize: 15, weight: .regular)
|
label.font = .systemFont(ofSize: 15, weight: .regular)
|
||||||
|
@ -268,18 +276,11 @@ extension StatusView {
|
||||||
nameLabel.heightAnchor.constraint(equalToConstant: 22).priority(.defaultHigh),
|
nameLabel.heightAnchor.constraint(equalToConstant: 22).priority(.defaultHigh),
|
||||||
])
|
])
|
||||||
titleContainerStackView.alignment = .firstBaseline
|
titleContainerStackView.alignment = .firstBaseline
|
||||||
let dotLabel: UILabel = {
|
titleContainerStackView.addArrangedSubview(nameTrialingDotLabel)
|
||||||
let label = UILabel()
|
|
||||||
label.textColor = Asset.Colors.Label.secondary.color
|
|
||||||
label.font = .systemFont(ofSize: 17)
|
|
||||||
label.text = "·"
|
|
||||||
return label
|
|
||||||
}()
|
|
||||||
titleContainerStackView.addArrangedSubview(dotLabel)
|
|
||||||
titleContainerStackView.addArrangedSubview(dateLabel)
|
titleContainerStackView.addArrangedSubview(dateLabel)
|
||||||
nameLabel.setContentHuggingPriority(.defaultHigh + 1, for: .horizontal)
|
nameLabel.setContentHuggingPriority(.defaultHigh + 1, for: .horizontal)
|
||||||
dotLabel.setContentHuggingPriority(.defaultHigh + 2, for: .horizontal)
|
nameTrialingDotLabel.setContentHuggingPriority(.defaultHigh + 2, for: .horizontal)
|
||||||
dotLabel.setContentCompressionResistancePriority(.required - 2, for: .horizontal)
|
nameTrialingDotLabel.setContentCompressionResistancePriority(.required - 2, for: .horizontal)
|
||||||
dateLabel.setContentHuggingPriority(.defaultHigh, for: .horizontal)
|
dateLabel.setContentHuggingPriority(.defaultHigh, for: .horizontal)
|
||||||
dateLabel.setContentCompressionResistancePriority(.required - 1, for: .horizontal)
|
dateLabel.setContentCompressionResistancePriority(.required - 1, for: .horizontal)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue