]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/frame.cpp
fixes
[wxWidgets.git] / src / gtk1 / frame.cpp
index bead5e36e2218f77d8c0a375bb2d1e09fb62a612..235078cff1dd9051e6b9bdd39de749ceead06e29 100644 (file)
@@ -2,9 +2,8 @@
 // Name:        frame.cpp
 // Purpose:
 // Author:      Robert Roebling
-// Created:     01/02/97
-// Id:
-// Copyright:   (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
+// Id:          $Id$
+// Copyright:   (c) 1998 Robert Roebling
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
@@ -27,7 +26,7 @@
 // constants
 //-----------------------------------------------------------------------------
 
-const int wxMENU_HEIGHT    = 28;
+const int wxMENU_HEIGHT    = 30;
 const int wxSTATUS_HEIGHT  = 25;
 
 //-----------------------------------------------------------------------------
@@ -136,7 +135,10 @@ bool wxFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title,
 
   m_title = title;
 
-  m_widget = gtk_window_new( GTK_WINDOW_TOPLEVEL );
+  GtkWindowType win_type = GTK_WINDOW_TOPLEVEL;
+  if (style & wxSIMPLE_BORDER) win_type = GTK_WINDOW_POPUP;
+  
+  m_widget = gtk_window_new( win_type );
   if ((size.x != -1) && (size.y != -1))
     gtk_widget_set_usize( m_widget, m_width, m_height );
   if ((pos.x != -1) && (pos.y != -1))
@@ -335,7 +337,9 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height
 
   if (m_frameToolBar)
   {
-    gtk_myfixed_move( GTK_MYFIXED(m_mainWindow), m_frameToolBar->m_widget, 1, wxMENU_HEIGHT );
+    int y = 0;
+    if (m_frameMenuBar) y = wxMENU_HEIGHT;
+    gtk_myfixed_move( GTK_MYFIXED(m_mainWindow), m_frameToolBar->m_widget, 1, y );
     gtk_widget_set_usize( m_frameToolBar->m_widget, width-2, toolbar_height );
   }
   
@@ -573,4 +577,3 @@ void wxFrame::SetIcon( const wxIcon &icon )
   
   gdk_window_set_icon( m_widget->window, (GdkWindow *) NULL, icon.GetPixmap(), bm );
 }
-