long style,
const wxString &name )
{
- bool rt = wxTopLevelWindow::Create(parent, id, title, pos, sizeOrig,
+ bool rt = wxTopLevelWindow::Create(parent, id, title, pos, sizeOrig,
style, name);
m_insertCallback = (wxInsertChildFunction) wxInsertChildInFrame;
return rt;
void wxFrame::DoGetClientSize( int *width, int *height ) const
{
wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
-
+
wxTopLevelWindow::DoGetClientSize( width, height );
if (height)
#if wxUSE_STATUSBAR
// status bar
- if (m_frameStatusBar && m_frameStatusBar->IsShown())
+ if (m_frameStatusBar && m_frameStatusBar->IsShown())
(*height) -= wxSTATUS_HEIGHT;
#endif // wxUSE_STATUSBAR
ww = m_width - 2*m_miniEdge;
hh = m_toolBarDetached ? wxPLACE_HOLDER
: m_frameToolBar->m_height;
-
+
client_area_y_offset += hh;
}
}
// resize window in OnInternalIdle
- m_sizeSet = FALSE;
+ GtkUpdateSize();
}
#endif // wxUSE_MENUS_NATIVE
m_insertInClientArea = TRUE;
- m_sizeSet = FALSE;
+ GtkUpdateSize();
return m_frameToolBar;
}
void wxFrame::SetToolBar(wxToolBar *toolbar)
{
+ bool hadTbar = m_frameToolBar != NULL;
+
wxFrameBase::SetToolBar(toolbar);
- if (m_frameToolBar)
+ if ( m_frameToolBar )
{
// insert into toolbar area if not already there
if ((m_frameToolBar->m_widget->parent) &&
GtkUpdateSize();
}
}
+ else // toolbar unset
+ {
+ // still need to update size if it had been there before
+ if ( hadTbar )
+ {
+ GtkUpdateSize();
+ }
+ }
}
#endif // wxUSE_TOOLBAR
wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
// because it will change when toolbar is added
- m_sizeSet = FALSE;
+ GtkUpdateSize();
return wxFrameBase::CreateStatusBar( number, style, id, name );
}
if ( !m_frameStatusBar )
return;
- m_sizeSet = FALSE;
+ GtkUpdateSize();
}
#endif // wxUSE_STATUSBAR