#if wxUSE_CARET
m_caret = (wxCaret *)NULL;
#endif // wxUSE_CARET
+
+ // Whether we're using the current theme for this window (wxGTK only for now)
+ m_themeEnabled = FALSE;
}
// common part of window creation process
xNew += posParent.x;
yNew += posParent.y;
- // move the centre of this window to this position
- Move(xNew, yNew);
+ // move the window to this position (keeping the old size but using
+ // SetSize() and not Move() to allow xNew and/or yNew to be -1)
+ SetSize(xNew, yNew, width, height, wxSIZE_ALLOW_MINUS_ONE);
}
// fits the window around the children
{
if ( GetChildren().GetCount() > 0 )
{
- SetClientSize(DoGetBestSize());
+ wxSize size = DoGetBestSize();
+
+ // for compatibility with the old versions and because it really looks
+ // slightly more pretty like this, add a pad
+ size.x += 7;
+ size.y += 14;
+
+ SetClientSize(size);
}
//else: do nothing if we have no children
}
node = node->GetNext() )
{
wxWindow *win = node->GetData();
- if ( win->IsTopLevel() || wxDynamicCast(win, wxStatusBar) )
+ if ( win->IsTopLevel() || wxDynamicCast(win, wxStatusBar) || !win->IsShown())
{
// dialogs and frames lie in different top level windows -
// don't deal with them here; as for the status bars, they
maxY = wy + wh;
}
- // leave a margin
- return wxSize(maxX + 7, maxY + 14);
+ return wxSize(maxX, maxY);
}
else
{