Fix for specific molecule

This commit is contained in:
Pfeil, Scott Robert 2020-05-22 16:25:12 -04:00
parent 740545e9c3
commit 528ae8a685
2 changed files with 10 additions and 7 deletions

View File

@ -674,15 +674,9 @@ public typealias ActionBlock = () -> ()
setScale(scale)
}
open override func layoutSubviews() {
super.layoutSubviews()
// This fixes a defect for when there are multiple labels stacked in a list item. Sometime some labels will not fill their available space.
preferredMaxLayoutWidth = frame.width
}
@objc public func updateView(_ size: CGFloat) {
scaleSize = size as NSNumber
if let originalAttributedString = originalAttributedString {
let attributedString = NSMutableAttributedString(attributedString: originalAttributedString)
attributedString.removeAttribute(.font, range: NSRange(location: 0, length: attributedString.length))
@ -881,6 +875,10 @@ extension Label {
return true
}
public func horizontalAlignment() -> UIStackView.Alignment {
return .leading
}
public func copyBackgroundColor() -> Bool {
return true
}

View File

@ -58,4 +58,9 @@ import Foundation
super.reset()
leftLabel.styleTitle2XLarge(true)
}
open override func layoutSubviews() {
super.layoutSubviews()
eyebrowHeadlineBodyLink.body.preferredMaxLayoutWidth = eyebrowHeadlineBodyLink.frame.width
}
}