Skip to content

Commit

Permalink
Adjust some theme colors
Browse files Browse the repository at this point in the history
  • Loading branch information
dpjudas committed Jul 21, 2024
1 parent a7bfed4 commit 15f0d47
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions SurrealEngine/EditorApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ int EditorApp::main(Array<std::string> args)
auto backend = DisplayBackend::TryCreateBackend();
DisplayBackend::Set(std::move(backend));
InitWidgetResources();
WidgetTheme::SetTheme(std::make_unique<LightWidgetTheme>());
WidgetTheme::SetTheme(std::make_unique<DarkWidgetTheme>());

try
{
Expand All @@ -29,7 +29,7 @@ int EditorApp::main(Array<std::string> args)

auto editorWindow = std::make_unique<EditorMainWindow>();
editorWindow->SetFrameGeometry(Rect::xywh(0.0, 0.0, 1024.0, 768.0));
editorWindow->Show();
editorWindow->ShowMaximized();

DisplayWindow::RunLoop();
}
Expand Down
6 changes: 3 additions & 3 deletions SurrealEngine/UI/Editor/Editor2DViewport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Editor2DViewport::~Editor2DViewport()

void Editor2DViewport::OnPaint(Canvas* canvas)
{
Colorf background(160 / 255.0f, 160 / 255.0f, 160 / 255.0f);
Colorf background = Colorf::fromRgba8(40, 40, 40);
canvas->fillRect(Rect::xywh(0.0, 0.0, GetWidth(), GetHeight()), background);
DrawGrid(canvas);
if (engine && engine->Level)
Expand Down Expand Up @@ -87,7 +87,7 @@ void Editor2DViewport::DrawNodeSurface(Canvas* canvas, BspNode* node)

BspVert* v = &model->Vertices[node->VertPool];

Colorf linecolor(80 / 255.0f, 80 / 255.0f, 220 / 255.0f);
Colorf linecolor = Colorf::fromRgba8(150, 150, 150);
Point center(GetWidth() * 0.5, GetHeight() * 0.5);

int numverts = node->NumVertices;
Expand All @@ -106,7 +106,7 @@ void Editor2DViewport::DrawNodeSurface(Canvas* canvas, BspNode* node)

void Editor2DViewport::DrawGrid(Canvas* canvas)
{
Colorf linecolor(128 / 255.0f, 128 / 255.0f, 128 / 255.0f);
Colorf linecolor = Colorf::fromRgba8(75, 75, 75);
Point center(GetWidth() * 0.5, GetHeight() * 0.5);

for (double y = -32767.0; y < 32767.0; y += 1000.0)
Expand Down
2 changes: 1 addition & 1 deletion SurrealEngine/UI/Editor/Editor3DViewport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Editor3DViewport::~Editor3DViewport()

void Editor3DViewport::OnPaint(Canvas* canvas)
{
canvas->fillRect(Rect::xywh(0.0, 0.0, GetWidth(), GetHeight()), Colorf(40 / 255.0f, 40 / 255.0f, 40 / 255.0f));
canvas->fillRect(Rect::xywh(0.0, 0.0, GetWidth(), GetHeight()), Colorf::fromRgba8(0, 0, 0));

if (!engine)
return;
Expand Down
2 changes: 1 addition & 1 deletion SurrealEngine/UI/Editor/EditorViewportFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ void EditorViewportFrame::Set3DMode()

void EditorViewportFrame::OnPaint(Canvas* canvas)
{
Colorf bordercolor(200 / 255.0f, 200 / 255.0f, 200 / 255.0f);
Colorf bordercolor(80 / 255.0f, 80 / 255.0f, 80 / 255.0f);
double headerHeight = 24.0;

double w = GetWidth();
Expand Down
2 changes: 1 addition & 1 deletion SurrealEngine/UI/Editor/EditorViewportHeader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ void EditorViewportHeader::SetTitle(const std::string& title)

void EditorViewportHeader::OnPaint(Canvas* canvas)
{
canvas->drawText({ 7.0, 17.0 }, Colorf(0.0f, 0.0f, 0.0f), Title);
canvas->drawText({ 7.0, 17.0 }, Colorf::fromRgba8(226, 223, 219), Title);
}
2 changes: 1 addition & 1 deletion Thirdparty/ZWidget/src/core/theme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ DarkWidgetTheme::DarkWidgetTheme()
checkbox_label->SetColor("unchecked-outer-border-color", Colorf::fromRgba8(99, 99, 99));
checkbox_label->SetColor("unchecked-inner-border-color", Colorf::fromRgba8(51, 51, 51));

menubar->SetColor("background-color", Colorf::fromRgba8(70, 70, 70));
menubar->SetColor("background-color", Colorf::fromRgba8(33, 33, 33));

menubaritem->SetColor("color", Colorf::fromRgba8(226, 223, 219));
menubaritem->SetColor("hover", "background-color", Colorf::fromRgba8(78, 78, 78));
Expand Down
2 changes: 1 addition & 1 deletion Thirdparty/ZWidget/src/widgets/menubar/menubar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -386,5 +386,5 @@ MenuItemSeparator::MenuItemSeparator(Widget* parent) : Widget(parent)

void MenuItemSeparator::OnPaint(Canvas* canvas)
{
canvas->fillRect(Rect::xywh(0.0, GridFitPoint(GetHeight() * 0.5), GetWidth(), GridFitSize(1.0)), Colorf::fromRgba8(200, 200, 200));
canvas->fillRect(Rect::xywh(0.0, GridFitPoint(GetHeight() * 0.5), GetWidth(), GridFitSize(1.0)), Colorf::fromRgba8(75, 75, 75));
}
2 changes: 1 addition & 1 deletion Thirdparty/ZWidget/src/widgets/statusbar/statusbar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ Statusbar::~Statusbar()

void Statusbar::OnPaint(Canvas* canvas)
{
canvas->drawText(Point(16.0, 21.0), Colorf::fromRgba8(0, 0, 0), "Command:");
canvas->drawText(Point(16.0, 21.0), Colorf::fromRgba8(226, 223, 219), "Command:");
}

0 comments on commit 15f0d47

Please sign in to comment.