Allow wxStaticText to have a custom fg without a custom bg
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32780 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -126,6 +126,19 @@ WXDWORD wxStaticText::MSWGetStyle(long style, WXDWORD *exstyle) const
|
||||
return msStyle;
|
||||
}
|
||||
|
||||
WXHBRUSH wxStaticText::DoMSWControlColor(WXHDC pDC, wxColour colBg)
|
||||
{
|
||||
// If this control has a non-standard fg colour but still has the standard
|
||||
// bg then we need to also give it a non-standard bg otherwise the fg
|
||||
// setting has no effect.
|
||||
WXHBRUSH hbr = wxControl::DoMSWControlColor(pDC, colBg);
|
||||
if (!hbr && m_hasFgCol)
|
||||
{
|
||||
hbr = MSWGetBgBrushForChild(pDC, this);
|
||||
}
|
||||
return hbr;
|
||||
}
|
||||
|
||||
wxSize wxStaticText::DoGetBestSize() const
|
||||
{
|
||||
wxClientDC dc(wx_const_cast(wxStaticText *, this));
|
||||
|
Reference in New Issue
Block a user