Start adding grid

This commit is contained in:
James Grogan 2022-11-17 17:33:48 +00:00
parent 9301769d58
commit f04d86e0ad
37 changed files with 709 additions and 211 deletions

View file

@ -1,6 +1,10 @@
#include "HorizontalSpacer.h"
#include "TextEditorView.h"
#include "HorizontalSpacer.h"
#include "VerticalSpacer.h"
#include "Theme.h"
#include "TextNode.h"
#include <iostream>
@ -21,7 +25,7 @@ void TextEditorView::Initialize()
{
auto label = Label::Create();
label->setLabel("Text Editor");
label->setBackgroundColor(Color(181, 189, 200));
label->setBackgroundColor(Theme::getBannerBackground());
label->setMargin(1);
auto textBox = TextBox::Create();
@ -30,7 +34,7 @@ void TextEditorView::Initialize()
auto saveButton = Button::Create();
saveButton->setLabel("Save");
saveButton->setBackgroundColor(Color(200, 200, 200));
saveButton->setBackgroundColor(Theme::getButtonPrimaryBackground());
saveButton->setMargin(2);
auto onSave = [this](Widget* self){
if(this && mController && mTextBox)
@ -43,7 +47,7 @@ void TextEditorView::Initialize()
auto clearButton = Button::Create();
clearButton->setLabel("Clear");
clearButton->setBackgroundColor(Color(200, 200, 200));
clearButton->setBackgroundColor(Theme::getButtonPrimaryBackground());
clearButton->setMargin(2);
auto onClear = [this](Widget* self){
if(this && mController && mTextBox)
@ -56,7 +60,7 @@ void TextEditorView::Initialize()
auto loadButton = Button::Create();
loadButton->setLabel("Load");
loadButton->setBackgroundColor(Color(200, 200, 200));
loadButton->setBackgroundColor(Theme::getButtonPrimaryBackground());
loadButton->setMargin(2);
auto onLoad = [this](Widget* self){
if(this && mController && mTextBox)