diff --git a/src/slic3r/GUI/2DBed.cpp b/src/slic3r/GUI/2DBed.cpp index e7c2cbe542..e0feac0605 100644 --- a/src/slic3r/GUI/2DBed.cpp +++ b/src/slic3r/GUI/2DBed.cpp @@ -34,11 +34,13 @@ void Bed_2D::repaint(const std::vector& 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(); diff --git a/src/slic3r/GUI/BedShapeDialog.cpp b/src/slic3r/GUI/BedShapeDialog.cpp index d692d45370..216bbad4ae 100644 --- a/src/slic3r/GUI/BedShapeDialog.cpp +++ b/src/slic3r/GUI/BedShapeDialog.cpp @@ -132,6 +132,7 @@ void BedShapeDialog::build_dialog(const ConfigOptionPoints& default_pt, const Co { SetFont(wxGetApp().normal_font()); + SetBackgroundColour(*wxWHITE); m_panel = new BedShapePanel(this); m_panel->build_panel(default_pt, custom_texture, custom_model); @@ -251,6 +252,7 @@ void BedShapePanel::build_panel(const ConfigOptionPoints& default_pt, const Conf ConfigOptionsGroupShp BedShapePanel::init_shape_options_page(const wxString& title) { wxPanel* panel = new wxPanel(m_shape_options_book); + panel->SetBackgroundColour(*wxWHITE); ConfigOptionsGroupShp optgroup = std::make_shared(panel, _L("Settings")); optgroup->label_width = 10; @@ -348,6 +350,8 @@ wxPanel* BedShapePanel::init_texture_panel() remove_btn->Bind(wxEVT_UPDATE_UI, ([this](wxUpdateUIEvent& e) { e.Enable(m_custom_texture != NONE); })); + parent->SetBackgroundColour(*wxWHITE); + return sizer; }; optgroup->append_line(line); @@ -436,6 +440,8 @@ wxPanel* BedShapePanel::init_model_panel() remove_btn->Bind(wxEVT_UPDATE_UI, ([this](wxUpdateUIEvent& e) { e.Enable(m_custom_model != NONE); })); + parent->SetBackgroundColour(*wxWHITE); + return sizer; }; optgroup->append_line(line); diff --git a/src/slic3r/GUI/BedShapeDialog.hpp b/src/slic3r/GUI/BedShapeDialog.hpp index 032aa28800..915b9fb308 100644 --- a/src/slic3r/GUI/BedShapeDialog.hpp +++ b/src/slic3r/GUI/BedShapeDialog.hpp @@ -93,7 +93,7 @@ class BedShapeDialog : public DPIDialog BedShapePanel* m_panel; public: BedShapeDialog(wxWindow* parent) : DPIDialog(parent, wxID_ANY, _(L("Bed Shape")), - wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) {} + wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE) {} void build_dialog(const ConfigOptionPoints& default_pt, const ConfigOptionString& custom_texture, const ConfigOptionString& custom_model);