wxPoint pt(0, 0);
#if wxUSE_TOOLBAR
- if ( GetToolBar() )
+ if ( GetToolBar() && GetToolBar()->IsShown() )
{
int w, h;
GetToolBar()->GetSize(& w, & h);
// for whatever reasons, wxGTK wants to have a small offset - it
// probably looks better with it?
#ifdef __WXGTK__
- static const int ofs = 0;
-#else
static const int ofs = 1;
+#else
+ static const int ofs = 0;
#endif
child->SetSize(ofs, ofs, clientW - 2*ofs, clientH - 2*ofs);
wxWindowID id,
const wxString& name)
{
- wxStatusBar *statusBar = new wxStatusBar(this, id,
- wxPoint(0, 0), wxSize(100, 20),
- style, name);
+ wxStatusBar *statusBar = new wxStatusBar(this, id, style, name);
// Set the height according to the font and the border size
wxClientDC dc(statusBar);
dc.SetFont(statusBar->GetFont());
- long y;
+ wxCoord y;
dc.GetTextExtent( "X", NULL, &y );
int height = (int)( (11*y)/10 + 2*statusBar->GetBorderY());
- statusBar->SetSize( -1, -1, 100, height );
+ statusBar->SetSize( -1, -1, -1, height );
statusBar->SetFieldsCount(number);