git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33356
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
wxMSW:
- fixed static box border when the label is empty
wxMSW:
- fixed static box border when the label is empty
+- fixed SetBackgroundColour() to change only label background, not entire box
// helper for OnPaint()
void wxStaticBox::PaintBackground(wxDC& dc, const RECT& rc)
{
// helper for OnPaint()
void wxStaticBox::PaintBackground(wxDC& dc, const RECT& rc)
{
- HBRUSH hbr = (HBRUSH)DoMSWControlColor(GetHdcOf(dc), wxNullColour);
+ // note that static box should be transparent, so it should show its
+ // parents colour, not its own
+ wxWindow * const parent = GetParent();
+
+ HBRUSH hbr = (HBRUSH)parent->MSWGetBgBrush(dc.GetHDC());
- wxBrush *
- brush = wxTheBrushList->FindOrCreateBrush(GetBackgroundColour());
+ wxBrush *brush =
+ wxTheBrushList->FindOrCreateBrush(parent->GetBackgroundColour());
if ( brush )
hbr = GetHbrushOf(*brush);
}
if ( brush )
hbr = GetHbrushOf(*brush);
}