Don't use wxINVERT mode in drawing focus rectangle for wxPGProperty
wxPGProperty of category type is drawn every time (with or without focus rectangle) on the clear background so there is no need to erase focus rectangle by overdrawing it in wxINVERT mode. It can be safely drawn in wxCOPY mode. See #16890.
This commit is contained in:
@@ -66,27 +66,10 @@ static void wxPGDrawFocusRect(wxWindow *win, wxDC& dc,
|
||||
wxRendererNative::Get().DrawFocusRect(win, dc, rect);
|
||||
#else
|
||||
wxUnusedVar(win);
|
||||
#ifdef __WXMSW__
|
||||
dc.SetLogicalFunction(wxINVERT);
|
||||
|
||||
wxPen pen(*wxBLACK,1,wxPENSTYLE_DOT);
|
||||
pen.SetCap(wxCAP_BUTT);
|
||||
dc.SetPen(pen);
|
||||
dc.SetBrush(*wxTRANSPARENT_BRUSH);
|
||||
|
||||
dc.DrawRectangle(rect);
|
||||
|
||||
dc.SetLogicalFunction(wxCOPY);
|
||||
#else
|
||||
dc.SetLogicalFunction(wxINVERT);
|
||||
|
||||
dc.SetPen(wxPen(*wxBLACK,1,wxPENSTYLE_DOT));
|
||||
dc.SetBrush(*wxTRANSPARENT_BRUSH);
|
||||
|
||||
dc.DrawRectangle(rect);
|
||||
|
||||
dc.SetLogicalFunction(wxCOPY);
|
||||
#endif // __WXMSW__/!__WXMSW__
|
||||
#endif // wxPG_USE_NATIVE_FOCUS_RECT_RENDERER/!wxPG_USE_NATIVE_FOCUS_RECT_RENDERER
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user