mirror of
https://github.com/metabolist/metatext.git
synced 2024-11-22 08:10:59 +00:00
Fix vertical content hugging
This commit is contained in:
parent
b0071b3058
commit
61735f6165
1 changed files with 3 additions and 0 deletions
|
@ -181,6 +181,7 @@ private extension StatusView {
|
||||||
displayNameLabel.font = .preferredFont(forTextStyle: .headline)
|
displayNameLabel.font = .preferredFont(forTextStyle: .headline)
|
||||||
displayNameLabel.adjustsFontForContentSizeCategory = true
|
displayNameLabel.adjustsFontForContentSizeCategory = true
|
||||||
displayNameLabel.setContentHuggingPriority(.required, for: .horizontal)
|
displayNameLabel.setContentHuggingPriority(.required, for: .horizontal)
|
||||||
|
displayNameLabel.setContentHuggingPriority(.required, for: .vertical)
|
||||||
displayNameLabel.setContentCompressionResistancePriority(.required, for: .horizontal)
|
displayNameLabel.setContentCompressionResistancePriority(.required, for: .horizontal)
|
||||||
nameAccountTimeStackView.addArrangedSubview(displayNameLabel)
|
nameAccountTimeStackView.addArrangedSubview(displayNameLabel)
|
||||||
|
|
||||||
|
@ -188,6 +189,7 @@ private extension StatusView {
|
||||||
accountLabel.adjustsFontForContentSizeCategory = true
|
accountLabel.adjustsFontForContentSizeCategory = true
|
||||||
accountLabel.textColor = .secondaryLabel
|
accountLabel.textColor = .secondaryLabel
|
||||||
accountLabel.setContentHuggingPriority(.required, for: .horizontal)
|
accountLabel.setContentHuggingPriority(.required, for: .horizontal)
|
||||||
|
accountLabel.setContentHuggingPriority(.required, for: .vertical)
|
||||||
nameAccountTimeStackView.addArrangedSubview(accountLabel)
|
nameAccountTimeStackView.addArrangedSubview(accountLabel)
|
||||||
|
|
||||||
timeLabel.font = .preferredFont(forTextStyle: .subheadline)
|
timeLabel.font = .preferredFont(forTextStyle: .subheadline)
|
||||||
|
@ -195,6 +197,7 @@ private extension StatusView {
|
||||||
timeLabel.textColor = .secondaryLabel
|
timeLabel.textColor = .secondaryLabel
|
||||||
timeLabel.textAlignment = .right
|
timeLabel.textAlignment = .right
|
||||||
timeLabel.setContentCompressionResistancePriority(.required, for: .horizontal)
|
timeLabel.setContentCompressionResistancePriority(.required, for: .horizontal)
|
||||||
|
timeLabel.setContentHuggingPriority(.required, for: .vertical)
|
||||||
nameAccountTimeStackView.addArrangedSubview(timeLabel)
|
nameAccountTimeStackView.addArrangedSubview(timeLabel)
|
||||||
|
|
||||||
nameAccountContainerStackView.spacing = .defaultSpacing
|
nameAccountContainerStackView.spacing = .defaultSpacing
|
||||||
|
|
Loading…
Reference in a new issue