Don't handle unset background colour as black in wxQt

Unset background colour actually means to use the default one, which is
still not the case for wxQt if the background had been previously
changed, but at the very least it doesn't change it to black any longer.

This commit is best viewed ignoring whitespace-only changes.
This commit is contained in:
Alex Shvartzkop 2024-02-13 21:49:53 +01:00 committed by Vadim Zeitlin
parent 4a5de60fa9
commit 4be5fde721

View file

@ -1294,8 +1294,11 @@ bool wxWindowQt::SetBackgroundColour(const wxColour& colour)
if ( !wxWindowBase::SetBackgroundColour(colour) )
return false;
QWidget *widget = QtGetParentWidget();
wxQtChangeRoleColour(widget->backgroundRole(), widget, colour);
if ( colour.IsOk() )
{
QWidget *widget = QtGetParentWidget();
wxQtChangeRoleColour(widget->backgroundRole(), widget, colour);
}
return true;
}