don't inherit the controls colours from the parent - at least for the background colour this is not the right thing to do
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14314 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -92,8 +92,14 @@ bool wxControlBase::CreateControl(wxWindowBase *parent,
|
|||||||
// inherit colour and font settings from the parent window
|
// inherit colour and font settings from the parent window
|
||||||
void wxControlBase::InheritAttributes()
|
void wxControlBase::InheritAttributes()
|
||||||
{
|
{
|
||||||
|
// it definitely doesn't make sense to inherit the background colour as the
|
||||||
|
// controls typically have their own standard one and probably not the
|
||||||
|
// foreground neither?
|
||||||
|
#if 0
|
||||||
SetBackgroundColour(GetParent()->GetBackgroundColour());
|
SetBackgroundColour(GetParent()->GetBackgroundColour());
|
||||||
SetForegroundColour(GetParent()->GetForegroundColour());
|
SetForegroundColour(GetParent()->GetForegroundColour());
|
||||||
|
#endif // 0
|
||||||
|
|
||||||
SetFont(GetParent()->GetFont());
|
SetFont(GetParent()->GetFont());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -79,6 +79,9 @@ bool wxStaticBox::Create(wxWindow *parent,
|
|||||||
WS_EX_TRANSPARENT) )
|
WS_EX_TRANSPARENT) )
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
// to be transparent we should have the same colour as the parent as well
|
||||||
|
SetBackgroundColour(GetParent()->GetBackgroundColour());
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user