]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/notebook.cpp
Next try at avoiding too few or too many size events.
[wxWidgets.git] / src / gtk1 / notebook.cpp
index ead39366057960784084b2a86567dcf192ddbb36..08f824bb720a02ba77945046532bc77f6f8564d0 100644 (file)
@@ -128,9 +128,9 @@ static void gtk_page_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation*
        here in order to make repositioning after resizing to take effect. */
     if ((gtk_major_version == 1) &&
         (gtk_minor_version == 2) &&
-       (gtk_micro_version < 6) &&
+           (gtk_micro_version < 6) &&
         (win->m_wxwindow) && 
-       (GTK_WIDGET_REALIZED(win->m_wxwindow)))
+           (GTK_WIDGET_REALIZED(win->m_wxwindow)))
     {
         gtk_widget_size_allocate( win->m_wxwindow, alloc );
     }
@@ -213,7 +213,7 @@ bool wxNotebook::Create(wxWindow *parent, wxWindowID id,
         !CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
     {
         wxFAIL_MSG( wxT("wxNoteBook creation failed") );
-       return FALSE;
+           return FALSE;
     }
 
 
@@ -230,15 +230,17 @@ bool wxNotebook::Create(wxWindow *parent, wxWindowID id,
 
     m_parent->DoAddChild( this );
 
-       if(m_windowStyle & wxNB_RIGHT)
+       if (m_windowStyle & wxNB_RIGHT)
                gtk_notebook_set_tab_pos( GTK_NOTEBOOK(m_widget), GTK_POS_RIGHT );
-       if(m_windowStyle & wxNB_LEFT)
+       if (m_windowStyle & wxNB_LEFT)
                gtk_notebook_set_tab_pos( GTK_NOTEBOOK(m_widget), GTK_POS_LEFT );
-       if(m_windowStyle & wxNB_BOTTOM)
+       if (m_windowStyle & wxNB_BOTTOM)
                gtk_notebook_set_tab_pos( GTK_NOTEBOOK(m_widget), GTK_POS_BOTTOM );
 
     PostCreation();
 
+    SetFont( parent->GetFont() );
+
     gtk_signal_connect( GTK_OBJECT(m_widget), "realize",
                             GTK_SIGNAL_FUNC(gtk_notebook_realized_callback), (gpointer) this );
 
@@ -625,6 +627,8 @@ bool wxNotebook::DoPhase( int WXUNUSED(nPhase) )
 
 void wxNotebook::ApplyWidgetStyle()
 {
+    // TODO, font for labels etc
+    
     SetWidgetStyle();
     gtk_widget_set_style( m_widget, m_widgetStyle );
 }