X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6cf68971005ab7a0ccee82ffffa2924eeb62f689..53ba4eb40a7107a83393597c41b146971233179d:/src/msw/statusbar.cpp diff --git a/src/msw/statusbar.cpp b/src/msw/statusbar.cpp index 8b58819757..a7031f4f51 100644 --- a/src/msw/statusbar.cpp +++ b/src/msw/statusbar.cpp @@ -9,6 +9,14 @@ // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + // for compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -38,8 +46,17 @@ #include "wx/msw/uxtheme.h" #endif +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +namespace +{ + // no idea for a default width, just choose something -#define DEFAULT_FIELD_WIDTH 25 +static const int DEFAULT_FIELD_WIDTH = 25; + +} // anonymous namespace // ---------------------------------------------------------------------------- // macros @@ -87,6 +104,12 @@ bool wxStatusBar::Create(wxWindow *parent, if ( style & wxCLIP_SIBLINGS ) wstyle |= WS_CLIPSIBLINGS; + // wxSTB_SIZEGRIP is part of our default style but it doesn't make sense to + // show size grip if this is the status bar of a non-resizeable TLW so turn + // it off in such case + if ( parent->IsTopLevel() && !parent->HasFlag(wxRESIZE_BORDER) ) + style &= ~wxSTB_SIZEGRIP; + // setting SBARS_SIZEGRIP is perfectly useless: it's always on by default // (at least in the version of comctl32.dll I'm using), and the only way to // turn it off is to use CCS_TOP style - as we position the status bar @@ -156,11 +179,7 @@ wxStatusBar::~wxStatusBar() // delete existing tooltips for (size_t i=0; i