X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1e255b00ced5114d9b599cd66cd9d737686cec94..b9efe021b554fa3967d1442cf758435c5cd5ae8f:/src/msw/stattext.cpp?ds=sidebyside diff --git a/src/msw/stattext.cpp b/src/msw/stattext.cpp index 518a7677fd..cc4b995d2d 100644 --- a/src/msw/stattext.cpp +++ b/src/msw/stattext.cpp @@ -126,19 +126,6 @@ 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)); @@ -156,7 +143,9 @@ wxSize wxStaticText::DoGetBestSize() const widthTextMax += 2; #endif // __WXWINCE__ - return wxSize(widthTextMax, heightTextTotal); + wxSize best(widthTextMax, heightTextTotal); + CacheBestSize(best); + return best; } void wxStaticText::DoSetSize(int x, int y, int w, int h, int sizeFlags)