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:
parent
4a5de60fa9
commit
4be5fde721
1 changed files with 5 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue