Support wxFULLSCREEN_NOMENUBAR

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42096 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2006-10-18 19:02:29 +00:00
parent 40131743c6
commit 3a8b3bd159
2 changed files with 23 additions and 6 deletions

View File

@@ -362,16 +362,17 @@ void wxFrame::GtkOnSize()
(GtkWidget*) NULL,
&geom,
(GdkWindowHints) flag );
// TODO
// Rewrite this terrible code to using GtkVBox
// I revert back to wxGTK's original behaviour. m_mainWidget holds
// the menubar, the toolbar and the client area, which is represented
// by m_wxwindow.
// This hurts in the eye, but I don't want to call SetSize()
// because I don't want to call any non-native functions here.
// m_mainWidget holds the menubar, the toolbar and the client
// area, which is represented by m_wxwindow.
#if wxUSE_MENUS_NATIVE
if (m_frameMenuBar)
if (m_frameMenuBar && !(m_fsIsShowing && (m_fsSaveFlag & wxFULLSCREEN_NOMENUBAR != 0)))
{
if (!GTK_WIDGET_VISIBLE(m_frameMenuBar->m_widget))
gtk_widget_show( m_frameMenuBar->m_widget );
int xx = m_miniEdge;
int yy = m_miniEdge + m_miniTitle;
int ww = m_width - 2*m_miniEdge;
@@ -388,6 +389,14 @@ void wxFrame::GtkOnSize()
xx, yy, ww, hh );
client_area_y_offset += hh;
}
else
{
if (m_frameMenuBar)
{
if (GTK_WIDGET_VISIBLE(m_frameMenuBar->m_widget))
gtk_widget_hide( m_frameMenuBar->m_widget );
}
}
#endif // wxUSE_MENUS_NATIVE
#if wxUSE_TOOLBAR