Merge branch 'donovan6000_wxdataviewitem_fix' of https://github.com/donovan6000/wxWidgets
Render disabled items as greyed out in wxDataViewCtrl. See https://github.com/wxWidgets/wxWidgets/pull/1277
This commit is contained in:
@@ -1067,7 +1067,7 @@ wxDataViewCustomRendererBase::RenderText(const wxString& text,
|
||||
int flags = 0;
|
||||
if ( state & wxDATAVIEW_CELL_SELECTED )
|
||||
flags |= wxCONTROL_SELECTED;
|
||||
if ( !GetOwner()->GetOwner()->IsEnabled() )
|
||||
if ( !(GetOwner()->GetOwner()->IsEnabled() && GetEnabled()) )
|
||||
flags |= wxCONTROL_DISABLED;
|
||||
|
||||
// Notice that we intentionally don't use any alignment here: it is not
|
||||
|
@@ -1298,7 +1298,7 @@ bool wxDataViewToggleRenderer::Render( wxRect cell, wxDC *dc, int WXUNUSED(state
|
||||
if (m_toggle)
|
||||
flags |= wxCONTROL_CHECKED;
|
||||
if (GetMode() != wxDATAVIEW_CELL_ACTIVATABLE ||
|
||||
GetEnabled() == false)
|
||||
!(GetOwner()->GetOwner()->IsEnabled() && GetEnabled()))
|
||||
flags |= wxCONTROL_DISABLED;
|
||||
|
||||
// Ensure that the check boxes always have at least the minimal required
|
||||
|
Reference in New Issue
Block a user