NEW:added dark mode

Change-Id: I3f61f1d93020e0a9dfba2c7d6cf6bf5194effcfa
This commit is contained in:
tao wang 2022-11-04 11:28:05 +08:00 committed by Lane.Wei
parent 6ae575d885
commit 6f4e80bbb6
78 changed files with 2021 additions and 398 deletions

View file

@ -33,15 +33,17 @@ SideButton::SideButton(wxWindow* parent, wxString text, wxString icon, long stly
border_color.append(0x00AE42, StateColor::Normal);
text_color.append(0xACACAC, StateColor::Disabled);
text_color.append(0xFFFFFF, StateColor::Pressed);
text_color.append(0xFFFFFF, StateColor::Hovered);
text_color.append(0xFFFFFF, StateColor::Normal);
text_color.append(0xFEFEFE, StateColor::Pressed);
text_color.append(0xFEFEFE, StateColor::Hovered);
text_color.append(0xFEFEFE, StateColor::Normal);
background_color.append(0x6B6B6B, StateColor::Disabled);
background_color.append(wxColour(23, 129, 63), StateColor::Pressed);
background_color.append(wxColour(48, 221, 112), StateColor::Hovered);
background_color.append(0x00AE42, StateColor::Normal);
SetBottomColour(wxColour("#3B4446"));
state_handler.attach({ &border_color, &text_color, &background_color });
state_handler.update_binds();
@ -194,7 +196,7 @@ void SideButton::dorender(wxDC& dc, wxDC& text_dc)
// draw background
dc.SetPen(wxNullPen);
dc.SetBrush(bottom_color);
dc.SetBrush(StateColor::darkModeColorFor(bottom_color));
dc.DrawRectangle(0, 0, size.x, size.y);
int states = state_handler.states();