Add initial token theming.
This commit is contained in:
parent
3d37a7244b
commit
1f85954e98
34 changed files with 406 additions and 253 deletions
|
@ -5,6 +5,9 @@
|
|||
#include "AbstractMesh.h"
|
||||
#include "MeshPrimitives.h"
|
||||
|
||||
#include "ThemeManager.h"
|
||||
#include "PaintEvent.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
std::unique_ptr<MeshViewerView> MeshViewerView::Create()
|
||||
|
@ -20,7 +23,7 @@ MeshViewerView::~MeshViewerView()
|
|||
MeshViewerView::MeshViewerView()
|
||||
{
|
||||
mName = "MeshViewerView";
|
||||
mBackgroundColor = {204, 204, 255};
|
||||
mBackground = ThemeToken::SystemToken::Background;
|
||||
}
|
||||
|
||||
void MeshViewerView::doPaint(const PaintEvent* event)
|
||||
|
@ -38,7 +41,7 @@ void MeshViewerView::doPaint(const PaintEvent* event)
|
|||
mMeshNode->setWidth(mSize.mWidth);
|
||||
mMeshNode->setHeight(mSize.mHeight);
|
||||
|
||||
mMeshNode->setFillColor(mBackgroundColor);
|
||||
mMeshNode->setFillColor(event->getThemesManager()->getColor(mBackground));
|
||||
|
||||
mRootNode->addChild(mMeshNode.get());
|
||||
}
|
||||
|
@ -52,7 +55,7 @@ void MeshViewerView::doPaint(const PaintEvent* event)
|
|||
|
||||
if (mMaterialDirty)
|
||||
{
|
||||
mMeshNode->setFillColor(mBackgroundColor);
|
||||
mMeshNode->setFillColor(event->getThemesManager()->getColor(mBackground));
|
||||
}
|
||||
|
||||
if (!mMesh)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue