Follow-up of eca4f0a4cd. Fixed preview background on all platforms

This commit is contained in:
enricoturri1966 2020-08-19 13:14:47 +02:00
parent eca4f0a4cd
commit db77f80681

View file

@ -238,7 +238,14 @@ bool Preview::init(wxWindow* parent, Model* model)
if (!Create(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 /* disable wxTAB_TRAVERSAL */))
return false;
#if ENABLE_GCODE_VIEWER
// to match the background of the sliders
#ifdef _WIN32
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
#else
SetBackgroundColour(GetParent()->GetBackgroundColour());
#endif // _WIN32
#endif // ENABLE_GCODE_VIEWER
m_canvas_widget = OpenGLManager::create_wxglcanvas(*this);
if (m_canvas_widget == nullptr)