]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/wincmn.cpp
interpret ~ specially only when it is the first character of the path (closes #10948...
[wxWidgets.git] / src / common / wincmn.cpp
index 8d3fa0af2cfa6ad9782857944ef0b99a0d633cf3..6243c4d73d807d7d3d0223c43c28652b0f6a4145 100644 (file)
@@ -154,7 +154,7 @@ wxWindowBase::wxWindowBase()
     m_exStyle =
     m_windowStyle = 0;
 
-    m_backgroundStyle = wxBG_STYLE_SYSTEM;
+    m_backgroundStyle = wxBG_STYLE_ERASE;
 
 #if wxUSE_CONSTRAINTS
     // no constraints whatsoever
@@ -705,9 +705,20 @@ wxSize wxWindowBase::GetEffectiveMinSize() const
 
 wxSize wxWindowBase::GetBestSize() const
 {
-    if ((!m_windowSizer) && (m_bestSizeCache.IsFullySpecified()))
+    if ( !m_windowSizer && m_bestSizeCache.IsFullySpecified() )
         return m_bestSizeCache;
 
+    // call DoGetBestClientSize() first, if a derived class overrides it wants
+    // it to be used
+    wxSize size = DoGetBestClientSize();
+    if ( size != wxDefaultSize )
+    {
+        size += DoGetBorderSize();
+
+        CacheBestSize(size);
+        return size;
+    }
+
     return DoGetBestSize();
 }
 
@@ -1333,8 +1344,6 @@ bool wxWindowBase::SetBackgroundColour( const wxColour &colour )
         return false;
 
     m_hasBgCol = colour.IsOk();
-    if ( m_backgroundStyle != wxBG_STYLE_CUSTOM )
-        m_backgroundStyle = m_hasBgCol ? wxBG_STYLE_COLOUR : wxBG_STYLE_SYSTEM;
 
     m_inheritBgCol = m_hasBgCol;
     m_backgroundColour = colour;