Fix rendering of inert wxDVC cells in wxOSX

Disabled appearance should only be used for disabled rows of otherwise
activable or editable renderers, not for inert ones. A typical example
is a bitmap renderer which rendered bitmaps slightly lighter due to its
disabled appearance. With this fix, the behavior is now consistent
across the three implementations.
This commit is contained in:
Václav Slavík
2016-12-16 19:09:47 +01:00
parent b13a923d0e
commit 6e885992f5

View File

@@ -2874,6 +2874,12 @@ void wxDataViewRenderer::SetAttr(const wxDataViewItemAttr& attr)
void wxDataViewRenderer::SetEnabled(bool enabled)
{
// setting the appearance to disabled grey should only be done for
// the active cells which are disabled, not for the cells which can
// never be edited at all
if ( GetMode() == wxDATAVIEW_CELL_INERT )
enabled = true;
[GetNativeData()->GetItemCell() setEnabled:enabled];
}