Add initial token theming.

This commit is contained in:
jmsgrogan 2023-01-17 13:01:59 +00:00
parent 3d37a7244b
commit 1f85954e98
34 changed files with 406 additions and 253 deletions

View file

@ -25,7 +25,7 @@ void TextEditorView::initialize()
{
auto label = Label::Create();
label->setLabel("Text Editor");
label->setBackgroundColor(Theme::getBannerBackground());
label->setBackground(ThemeToken::SystemToken::Secondary);
label->setMargin(1);
auto textBox = TextBox::Create();
@ -34,7 +34,7 @@ void TextEditorView::initialize()
auto saveButton = Button::Create();
saveButton->setLabel("Save");
saveButton->setBackgroundColor(Theme::getButtonPrimaryBackground());
saveButton->setBackground(ThemeToken::SystemToken::Primary);
saveButton->setMargin(2);
auto onSave = [this](Widget* self){
if(this && mController && mTextBox)
@ -47,7 +47,7 @@ void TextEditorView::initialize()
auto clearButton = Button::Create();
clearButton->setLabel("Clear");
clearButton->setBackgroundColor(Theme::getButtonPrimaryBackground());
clearButton->setBackground(ThemeToken::SystemToken::Primary);
clearButton->setMargin(2);
auto onClear = [this](Widget* self){
if(this && mController && mTextBox)
@ -60,7 +60,7 @@ void TextEditorView::initialize()
auto loadButton = Button::Create();
loadButton->setLabel("Load");
loadButton->setBackgroundColor(Theme::getButtonPrimaryBackground());
loadButton->setBackground(ThemeToken::SystemToken::Primary);
loadButton->setMargin(2);
auto onLoad = [this](Widget* self){
if(this && mController && mTextBox)