Digital ACT191 defect FeaturedProducts - Fix for bold when the font isn't supported, and for bg image forcing full image size.
This commit is contained in:
parent
1b5ca94988
commit
47e63e0c8b
@ -94,29 +94,34 @@ open class TileletModel: TileContainerBaseModel<Tilelet.Padding, Tilelet>, Molec
|
||||
public func eyebrowModel(delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?) -> Tilelet.EyebrowModel? {
|
||||
guard let eyebrow else { return nil }
|
||||
let attrs = eyebrow.attributes?.toVDSLabelAttributeModel(delegateObject: delegateObject, additionalData: additionalData)
|
||||
var isBold: Bool = true
|
||||
do {
|
||||
if let style = eyebrow.fontStyle {
|
||||
isBold = style.isBold()
|
||||
return .init(text: eyebrow.text,
|
||||
textColor: eyebrowColor,
|
||||
textAttributes: attrs, isBold: style.isBold(),
|
||||
textAttributes: attrs,
|
||||
isBold: isBold,
|
||||
standardStyle: try style.vdsSubsetStyle())
|
||||
}
|
||||
} catch MVMCoreError.errorObject(let object) {
|
||||
MVMCoreLoggingHandler.shared()?.addError(toLog: object)
|
||||
} catch { }
|
||||
|
||||
return .init(text: eyebrow.text, textColor: eyebrowColor, textAttributes: attrs)
|
||||
return .init(text: eyebrow.text, textColor: eyebrowColor, textAttributes: attrs, isBold: isBold)
|
||||
}
|
||||
|
||||
public func titleModel(delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?) -> Tilelet.TitleModel? {
|
||||
guard let title else { return nil }
|
||||
let attrs = title.attributes?.toVDSLabelAttributeModel(delegateObject: delegateObject, additionalData: additionalData)
|
||||
|
||||
var isBold: Bool = true
|
||||
do {
|
||||
if let style = title.fontStyle {
|
||||
isBold = style.isBold()
|
||||
return .init(text: title.text,
|
||||
textColor: titleColor,
|
||||
textAttributes: attrs,
|
||||
isBold: isBold,
|
||||
standardStyle: try style.vdsSubsetStyle())
|
||||
}
|
||||
|
||||
@ -124,7 +129,7 @@ open class TileletModel: TileContainerBaseModel<Tilelet.Padding, Tilelet>, Molec
|
||||
MVMCoreLoggingHandler.shared()?.addError(toLog: object)
|
||||
} catch { }
|
||||
|
||||
return .init(text: title.text, textColor: titleColor, textAttributes: attrs)
|
||||
return .init(text: title.text, textColor: titleColor, textAttributes: attrs, isBold: isBold)
|
||||
}
|
||||
|
||||
public func subTitleModel(delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?) -> Tilelet.SubTitleModel? {
|
||||
|
||||
@ -16,6 +16,8 @@ open class BGImageMolecule: MoleculeContainer {
|
||||
super.setupView()
|
||||
insertSubview(image, at: 0)
|
||||
NSLayoutConstraint.constraintPinSubview(toSuperview: image)
|
||||
image.setContentCompressionResistancePriority(.defaultLow, for: .vertical)
|
||||
image.imageView.setContentCompressionResistancePriority(.defaultLow, for: .vertical)
|
||||
}
|
||||
|
||||
open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user