Fix drawing caret on GTK3 with GDK_SCALE=2

Don't use pen when drawing solid rectangle, avoids partial outline left on window.
This commit is contained in:
Paul Cornett 2022-03-27 13:49:00 -07:00
parent 0993d4f18e
commit 03bf61be3c

View File

@ -287,8 +287,16 @@ void wxCaret::DoDraw(wxDC *dc, wxWindow* win)
brush = *wxWHITE_BRUSH;
}
}
if (m_hasFocus)
{
dc->SetPen(*wxTRANSPARENT_PEN);
dc->SetBrush(brush);
}
else
{
dc->SetPen(pen);
dc->SetBrush(m_hasFocus ? brush : *wxTRANSPARENT_BRUSH);
dc->SetBrush(*wxTRANSPARENT_BRUSH);
}
// VZ: unfortunately, the rectangle comes out a pixel smaller when this is
// done under wxGTK - no idea why