fixed wxStaticBox::SetBackgroundColour(): this should change background for the label only, not the entire box contents
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33356 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
6ecfb2c870
commit
f05f427fc1
@ -12,6 +12,7 @@ All:
|
||||
wxMSW:
|
||||
|
||||
- fixed static box border when the label is empty
|
||||
- fixed SetBackgroundColour() to change only label background, not entire box
|
||||
|
||||
2.5.5
|
||||
-----
|
||||
|
@ -286,11 +286,15 @@ WXHRGN wxStaticBox::MSWGetRegionWithoutChildren()
|
||||
// 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());
|
||||
if ( !hbr )
|
||||
{
|
||||
wxBrush *
|
||||
brush = wxTheBrushList->FindOrCreateBrush(GetBackgroundColour());
|
||||
wxBrush *brush =
|
||||
wxTheBrushList->FindOrCreateBrush(parent->GetBackgroundColour());
|
||||
if ( brush )
|
||||
hbr = GetHbrushOf(*brush);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user