X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ccdc11bbaf0310a474ad7b9d41413b31c3544356..20c81bed846981e90769826b94a91eebb91158f1:/src/univ/stattext.cpp diff --git a/src/univ/stattext.cpp b/src/univ/stattext.cpp index 38da4fb592..83ebf31eaf 100644 --- a/src/univ/stattext.cpp +++ b/src/univ/stattext.cpp @@ -57,7 +57,7 @@ bool wxStaticText::Create(wxWindow *parent, return false; SetLabel(label); - SetBestSize(size); + SetInitialSize(size); return true; } @@ -88,6 +88,14 @@ wxSize wxStaticText::DoGetBestClientSize() const void wxStaticText::DoDraw(wxControlRenderer *renderer) { + if ( UseBgCol() ) + { + wxDC& dc = renderer->GetDC(); + dc.SetBrush(GetBackgroundColour()); + dc.SetPen(*wxTRANSPARENT_PEN); + dc.DrawRectangle(renderer->GetRect()); + } + renderer->DrawLabel(); }