refactored titlelockup into sections

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2024-06-14 15:52:24 -05:00
parent aedf4eb520
commit b7185c5ffa

View File

@ -146,31 +146,40 @@ class TitleLockupViewController: BaseViewController<TitleLockup> {
addFormRow(label: "Surface", view: surfacePickerSelectorView) addFormRow(label: "Surface", view: surfacePickerSelectorView)
addFormRow(label: "Text Alignment", view: textAlignmentPickerSelectorView) addFormRow(label: "Text Alignment", view: textAlignmentPickerSelectorView)
addFormRow(label: "Eyebrow/Subtitle Style", view: otherStandardStylePickerSelectorView) append(section: .init().with({
addFormRow(label: "Eyebrow is Bold", view: eyebrowIsBold) $0.title = "\nEyebrow"
addFormRow(label: "Eyebrow Text", view: eyebrowTextField) $0.addFormRow(label: "TextStyle (Subtitle)", view: otherStandardStylePickerSelectorView)
addFormRow(label: "Eyebrow Color", view: eyebrowColorPickerSelectorView) $0.addFormRow(label: "is Bold", view: eyebrowIsBold)
$0.addFormRow(label: "Text", view: eyebrowTextField)
$0.addFormRow(label: "Color", view: eyebrowColorPickerSelectorView)
}))
eyebrowTokenFormStackView.addFormRow(label: "Token", view: eyebrowTokenColorView) eyebrowTokenFormStackView.addFormRow(label: "Token", view: eyebrowTokenColorView)
eyebrowColorFormStackView.addFormRow(label: "Custom", view: eyebrowCustomColorView) eyebrowColorFormStackView.addFormRow(label: "Custom", view: eyebrowCustomColorView)
append(section: eyebrowTokenFormStackView) append(section: eyebrowTokenFormStackView)
append(section: eyebrowColorFormStackView) append(section: eyebrowColorFormStackView)
addFormRow(label: "Title is Bold", view: titleIsBold) append(section: .init().with({
addFormRow(label: "Title Style", view: titleStandardStylePickerSelectorView) $0.title = "\nTitle"
addFormRow(label: "Title Text", view: titleTextField) $0.addFormRow(label: "TextStyle", view: titleStandardStylePickerSelectorView)
addFormRow(label: "Title Color", view: titleColorPickerSelectorView) $0.addFormRow(label: "is Bold", view: titleIsBold)
$0.addFormRow(label: "Text", view: titleTextField)
$0.addFormRow(label: "Color", view: titleColorPickerSelectorView)
}))
titleTokenFormStackView.addFormRow(label: "Token", view: titleTokenColorView) titleTokenFormStackView.addFormRow(label: "Token", view: titleTokenColorView)
titleColorFormStackView.addFormRow(label: "Custom", view: titleCustomColorView) titleColorFormStackView.addFormRow(label: "Custom", view: titleCustomColorView)
append(section: titleTokenFormStackView) append(section: titleTokenFormStackView)
append(section: titleColorFormStackView) append(section: titleColorFormStackView)
addFormRow(label: "Subtitle Text", view: subTitleTextField) append(section: .init().with({
addFormRow(label: "Subtitle Color", view: subtitleColorPickerSelectorView) $0.title = "\nSubtitle"
$0.addFormRow(label: "Subtitle Text", view: subTitleTextField)
$0.addFormRow(label: "Subtitle Color", view: subtitleColorPickerSelectorView)
}))
subtitleTokenFormStackView.addFormRow(label: "Token", view: subtitleTokenColorView) subtitleTokenFormStackView.addFormRow(label: "Token", view: subtitleTokenColorView)
subtitleColorFormStackView.addFormRow(label: "Custom", view: subtitleCustomColorView) subtitleColorFormStackView.addFormRow(label: "Custom", view: subtitleCustomColorView)
append(section: subtitleTokenFormStackView) append(section: subtitleTokenFormStackView)
append(section: subtitleColorFormStackView) append(section: subtitleColorFormStackView)
eyebrowIsBold.publisher(for: .valueChanged).sink { [weak self] toggle in eyebrowIsBold.publisher(for: .valueChanged).sink { [weak self] toggle in
self?.setOtherModels() self?.setOtherModels()