Use wxCONTROL_FOCUSED control state flag when drawing native wxPG check box in the "modified state" under wxOSX.
Generally, wxCONTROL_PRESSED control flag is used when drawing native check box (wxPGEditor_CheckBox) in "modified state" but under wxOSX this flag is equivalent to wxCONTROL_CHECKED flag and hence it is necessary to indicate this state in an alternative way. Closes #16696 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78212 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1426,7 +1426,14 @@ static void DrawSimpleCheckBox( wxWindow* win, wxDC& dc, const wxRect& rect,
|
|||||||
|
|
||||||
if ( state & wxSCB_STATE_BOLD )
|
if ( state & wxSCB_STATE_BOLD )
|
||||||
{
|
{
|
||||||
|
// wxCONTROL_CHECKED and wxCONTROL_PRESSED flags
|
||||||
|
// are equivalent for wxOSX so we have to use
|
||||||
|
// other flag to indicate "selected state".
|
||||||
|
#ifdef __WXOSX__
|
||||||
|
cbFlags |= wxCONTROL_FOCUSED;
|
||||||
|
#else
|
||||||
cbFlags |= wxCONTROL_PRESSED;
|
cbFlags |= wxCONTROL_PRESSED;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
wxRendererNative::Get().DrawCheckBox(win, dc, r, cbFlags);
|
wxRendererNative::Get().DrawCheckBox(win, dc, r, cbFlags);
|
||||||
|
Reference in New Issue
Block a user