From: Vadim Zeitlin Date: Thu, 18 Nov 2004 22:32:52 +0000 (+0000) Subject: set background style to wxBG_STYLE_COLOUR in SetBackgroundColour() X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/17bcd9a6b5ecddcefa32e630a3d6fe114e56e17b?hp=ffa762ff49ed659c4483d67e5dfbd9971f9638f3 set background style to wxBG_STYLE_COLOUR in SetBackgroundColour() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30620 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index 690233bc75..f906802a0f 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -1041,6 +1041,9 @@ bool wxWindowBase::SetBackgroundColour( const wxColour &colour ) return false; m_hasBgCol = colour.Ok(); + if ( m_backgroundStyle != wxBG_STYLE_CUSTOM ) + m_backgroundStyle = m_hasBgCol ? wxBG_STYLE_COLOUR : wxBG_STYLE_SYSTEM; + m_inheritBgCol = m_hasBgCol; m_backgroundColour = colour; SetThemeEnabled( !m_hasBgCol && !m_foregroundColour.Ok() );