X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c7e61a5ed29f91f4e0c19c9f37ed25e7e809ada6..93bfd481b7f2f0fec50dd79fcab52374aa59ebbb:/src/common/toplvcmn.cpp diff --git a/src/common/toplvcmn.cpp b/src/common/toplvcmn.cpp index 6ff702eff3..7dfc0060af 100644 --- a/src/common/toplvcmn.cpp +++ b/src/common/toplvcmn.cpp @@ -125,6 +125,30 @@ wxSize wxTopLevelWindowBase::GetMaxSize() const return size; } +/* static */ +wxSize wxTopLevelWindowBase::GetDefaultSize() +{ + wxSize size = wxGetClientDisplayRect().GetSize(); + + // create proportionally bigger windows on small screens + if ( size.x >= 1024 ) + size.x = 400; + else if ( size.x >= 800 ) + size.x = 300; + else if ( size.x >= 320 ) + size.x = 240; + + if ( size.y >= 768 ) + size.y = 250; + else if ( size.y > 200 ) + { + size.y *= 2; + size.y /= 3; + } + + return size; +} + // ---------------------------------------------------------------------------- // wxTopLevelWindow size management: we exclude the areas taken by // menu/status/toolbars from the client area, so the client area is what's @@ -241,4 +265,9 @@ void wxTopLevelWindowBase::DoUpdateWindowUI(wxUpdateUIEvent& event) } } -// vi:sts=4:sw=4:et +void wxTopLevelWindowBase::RequestUserAttention(int WXUNUSED(flags)) +{ + // it's probably better than do nothing, isn't it? + Raise(); +} +