FIX: bedshape dialog dark mode issue

Jira: STUDIO-4572

refine UI of the dialog under dark mode

Change-Id: I188a50bd8909c2ab090fbb1a095c4c45da150071
This commit is contained in:
liz.li 2023-09-26 17:42:41 +08:00 committed by Lane.Wei
parent d3e2f011e4
commit 999ceddea1
3 changed files with 14 additions and 6 deletions

View file

@ -34,11 +34,13 @@ void Bed_2D::repaint(const std::vector<Vec2d>& shape)
// On MacOS the background is erased, on Windows the background is not erased
// and on Linux / GTK the background is erased to gray color.
// Fill DC with the background on Windows & Linux / GTK.
#ifdef _WIN32
auto color = wxGetApp().get_highlight_default_clr();
#else
auto color = wxSystemSettings::GetColour(wxSYS_COLOUR_3DLIGHT); //GetSystemColour
#endif
wxColour color;
if (wxGetApp().dark_mode()) {// SetBackgroundColour
color = wxColour(45, 45, 49);
}
else {
color = *wxWHITE;
}
dc.SetPen(*new wxPen(color, 1, wxPENSTYLE_SOLID));
dc.SetBrush(*new wxBrush(color, wxBRUSHSTYLE_SOLID));
auto rect = GetUpdateRegion().GetBox();