- dc->SetPen( *wxBLACK_PEN );
- dc->DrawLine( m_x, m_y, m_x+m_width, m_y );
- dc->DrawLine( m_x, m_y+m_height, m_x+m_width, m_y+m_height );
- dc->DrawLine( m_x+(m_width/2), m_y, m_x+(m_width/2), m_y+m_height );
-// dc->DrawLine( m_x+(m_width/2)+1, m_y, m_x+(m_width/2)+1, m_y+m_height );
+ wxPen pen(*wxBLACK_PEN);
+ wxBrush brush(*wxBLACK_BRUSH);
+ if (win)
+ {
+ wxColour backgroundColour(win->GetBackgroundColour());
+ if (backgroundColour.Red() < 100 &&
+ backgroundColour.Green() < 100 &&
+ backgroundColour.Blue() < 100)
+ {
+ pen = *wxWHITE_PEN;
+ brush = *wxWHITE_BRUSH;
+ }
+ }
+ dc->SetPen( pen );
+ dc->SetBrush(m_hasFocus ? brush : *wxTRANSPARENT_BRUSH);
+
+ // VZ: unfortunately, the rectangle comes out a pixel smaller when this is
+ // done under wxGTK - no idea why
+ //dc->SetLogicalFunction(wxINVERT);
+
+ dc->DrawRectangle(m_x, m_y, m_width, m_height);