- // VZ: Robert's code for I-shaped caret - this is nice but doesn't look
- // at all the same as the MSW version and I don't know how to indicate
- // that the window has focus or not with such caret
-#if 0
- 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 );
-#else // 1
- if ( m_hasFocus )
- dc->SetBrush( *wxBLACK_BRUSH );
- dc->DrawRectangle( m_x, m_y, m_width, m_height );
-#endif // 0/1
+ dc->SetBrush(*(m_hasFocus ? wxBLACK_BRUSH : wxTRANSPARENT_BRUSH));
+ dc->SetPen(*wxBLACK_PEN);
+
+ // 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);