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:
@@ -2874,6 +2874,12 @@ void wxDataViewRenderer::SetAttr(const wxDataViewItemAttr& attr)
|
|||||||
|
|
||||||
void wxDataViewRenderer::SetEnabled(bool enabled)
|
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];
|
[GetNativeData()->GetItemCell() setEnabled:enabled];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user