Grey out grid headers if its parent is disabled too

It doesn't really matter whether the grid is disabled because it was
explicitly disabled itself or because it's implicitly disabled due to
its parent being disabled, it should still show its disabled status to
the user by rendering its headers in a greyed out state.
This commit is contained in:
Vadim Zeitlin 2019-09-24 01:32:53 +02:00
parent 3b491c0776
commit ec76367afd

View File

@ -276,7 +276,7 @@ void wxGridHeaderLabelsRenderer::DrawLabel(const wxGrid& grid,
// because this results in a better disabled appearance for the default
// bold font used for the labels.
wxColour colText;
if ( !grid.IsThisEnabled() )
if ( !grid.IsEnabled() )
{
colText = wxSystemSettings::GetColour(wxSYS_COLOUR_BTNHIGHLIGHT);
dc.SetTextForeground(colText);