updated titleLockup logic for janet
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
f10ea3d5d6
commit
635d5abe9f
@ -309,15 +309,27 @@ open class TitleLockup: View {
|
|||||||
if let eyebrowModel, !eyebrowModel.text.isEmpty {
|
if let eyebrowModel, !eyebrowModel.text.isEmpty {
|
||||||
eyebrowTextIsEmpty = false
|
eyebrowTextIsEmpty = false
|
||||||
eyebrowLabel.textPosition = allLabelsTextPosition
|
eyebrowLabel.textPosition = allLabelsTextPosition
|
||||||
eyebrowLabel.textStyle = eyebrowModel.isBold ? otherStandardStyle.value.bold : otherStandardStyle.value.regular
|
|
||||||
eyebrowLabel.text = eyebrowModel.text
|
eyebrowLabel.text = eyebrowModel.text
|
||||||
eyebrowLabel.attributes = eyebrowModel.textAttributes
|
eyebrowLabel.attributes = eyebrowModel.textAttributes
|
||||||
eyebrowLabel.numberOfLines = eyebrowModel.numberOfLines
|
eyebrowLabel.numberOfLines = eyebrowModel.numberOfLines
|
||||||
eyebrowLabel.surface = surface
|
eyebrowLabel.surface = surface
|
||||||
if let titleModel, isUniformSize && titleModel.isBold {
|
|
||||||
eyebrowLabel.textColorConfiguration = textColorSecondaryConfiguration
|
//When uniform size is true
|
||||||
|
if let titleModel, isUniformSize {
|
||||||
|
if titleModel.isBold {
|
||||||
|
//When uniform size is true and the title is bold,
|
||||||
|
//the eyebrow is always regular weight and the secondary color.
|
||||||
|
eyebrowLabel.textStyle = otherStandardStyle.value.regular
|
||||||
|
eyebrowLabel.textColorConfiguration = textColorSecondaryConfiguration
|
||||||
|
} else {
|
||||||
|
//When uniform size is true and the title is regular weight
|
||||||
|
//the eyebrow is always bold and uses the primary color.
|
||||||
|
eyebrowLabel.textStyle = otherStandardStyle.value.bold
|
||||||
|
eyebrowLabel.textColorConfiguration = textColorPrimaryConfiguration
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
eyebrowLabel.textColorConfiguration = textColorPrimaryConfiguration
|
eyebrowLabel.textColorConfiguration = textColorPrimaryConfiguration
|
||||||
|
eyebrowLabel.textStyle = eyebrowModel.isBold ? otherStandardStyle.value.bold : otherStandardStyle.value.regular
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
eyebrowLabel.reset()
|
eyebrowLabel.reset()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user