Add initial token theming.
This commit is contained in:
parent
3d37a7244b
commit
1f85954e98
34 changed files with 406 additions and 253 deletions
|
@ -12,7 +12,7 @@ ImageEditorView::ImageEditorView()
|
|||
{
|
||||
auto label = Label::Create();
|
||||
label->setLabel("Image Editor");
|
||||
label->setBackgroundColor(Theme::getBackgroundPrimary());
|
||||
label->setBackground(ThemeToken::SystemToken::Primary);
|
||||
label->setMargin(1);
|
||||
|
||||
auto image_widget = std::make_unique<ImageViewWidget>();
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
#include "GridNode.h"
|
||||
#include "TransformNode.h"
|
||||
|
||||
#include <iostream>
|
||||
#include "ThemeManager.h"
|
||||
#include "PaintEvent.h"
|
||||
|
||||
ImageViewWidget::ImageViewWidget()
|
||||
{
|
||||
|
@ -27,7 +28,7 @@ void ImageViewWidget::doPaint(const PaintEvent* event)
|
|||
mGridNode->setWidth(mSize.mWidth);
|
||||
mGridNode->setHeight(mSize.mHeight);
|
||||
|
||||
mGridNode->setStrokeColor(mBorderColor);
|
||||
mGridNode->setStrokeColor(event->getThemesManager()->getColor(mBorder));
|
||||
|
||||
mRootNode->addChild(mGridNode.get());
|
||||
}
|
||||
|
@ -41,6 +42,6 @@ void ImageViewWidget::doPaint(const PaintEvent* event)
|
|||
|
||||
if (mMaterialDirty)
|
||||
{
|
||||
mGridNode->setFillColor(mBorderColor);
|
||||
mGridNode->setFillColor(event->getThemesManager()->getColor(mBorder));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue