udpated code for micro fix

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2022-08-17 14:27:57 -05:00
parent 741a703d0b
commit f44ac60f88

View File

@ -136,14 +136,18 @@ class LabelViewController: ModelViewController<DefaultLabelModel>, StoryboardIni
didSet {
fontCategoryLabel.text = fontCategory.rawValue
textSizePicker.items = fontCategory.sizes
textSize = textSizePicker.items[0]
if textSizePicker.items.count > 0 {
textSize = textSizePicker.items[0]
} else {
textSize = nil
}
updateLabelStyle()
}
}
private var textSize: TypographicalStyle.FontSize = .large {
private var textSize: TypographicalStyle.FontSize? = .large {
didSet {
textSizeLabel.text = textSize.rawValue
textSizeLabel.text = textSize?.rawValue ?? ""
updateLabelStyle()
}