X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6a7dd4b3ab87dd870aadbe0148fbb81122ae97e4..73ed39b580977913998bbb988e52e474fe9835ae:/src/common/wincmn.cpp?ds=sidebyside diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index 8277a7c785..c296441e77 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -215,6 +215,9 @@ wxWindowBase::wxWindowBase() // VZ: this one shouldn't exist... m_isBeingDeleted = false; + + // Reserved for future use + m_windowReserved = NULL; } // common part of window creation process @@ -811,10 +814,17 @@ void wxWindowBase::DoSetVirtualSize( int x, int y ) wxSize wxWindowBase::DoGetVirtualSize() const { - if (m_virtualSize == wxDefaultSize) - return GetClientSize(); + if ( m_virtualSize.IsFullySpecified() ) + return m_virtualSize; + + wxSize size = GetClientSize(); + if ( m_virtualSize.x != wxDefaultCoord ) + size.x = m_virtualSize.x; - return m_virtualSize; + if ( m_virtualSize.y != wxDefaultCoord ) + size.y = m_virtualSize.y; + + return size; } // ---------------------------------------------------------------------------- @@ -1037,8 +1047,17 @@ wxWindowBase::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant)) wxVisualAttributes attrs; attrs.font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); attrs.colFg = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT); - attrs.colBg = wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE); + // On Smartphone/PocketPC, wxSYS_COLOUR_WINDOW is a better reflection of + // the usual background colour than wxSYS_COLOUR_BTNFACE. + // It's a pity that wxSYS_COLOUR_WINDOW isn't always a suitable background + // colour on other platforms. + +#if defined(__WXWINCE__) && (defined(__SMARTPHONE__) || defined(__POCKETPC__)) + attrs.colBg = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW); +#else + attrs.colBg = wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE); +#endif return attrs; }