An attempt to get RammingChart background colour consistent with its parent(s) on all platforms

This commit is contained in:
Lukas Matena 2018-04-10 10:50:18 +02:00
parent bbbb5c9a93
commit f49a7be90c
2 changed files with 13 additions and 0 deletions

View file

@ -15,6 +15,11 @@ wxDEFINE_EVENT(EVT_WIPE_TOWER_CHART_CHANGED, wxCommandEvent);
void Chart::draw() {
wxAutoBufferedPaintDC dc(this); // unbuffered DC caused flickering on win
dc.SetBrush(GetBackgroundColour());
dc.SetPen(GetBackgroundColour());
dc.DrawRectangle(GetClientRect()); // otherwise the background would end up black on windows
dc.SetPen(*wxBLACK_PEN);
dc.SetBrush(*wxWHITE_BRUSH);
dc.DrawRectangle(m_rect);