]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/button.cpp
All functionality I know hot implement already implemented.
[wxWidgets.git] / src / gtk1 / button.cpp
index f2a516ec655e8909b526d710200478b798cd3ead..249465f3669ec773e9e72c3057e012821561e319 100644 (file)
@@ -2,7 +2,7 @@
 // Name:        button.cpp
 // Purpose:
 // Author:      Robert Roebling
-// Id:          $id$
+// Id:          $Id$
 // Copyright:   (c) 1998 Robert Roebling
 // Licence:    wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -74,6 +74,7 @@ bool wxButton::Create(  wxWindow *parent, wxWindowID id, const wxString &label,
   PostCreation();
   
   SetBackgroundColour( parent->GetBackgroundColour() );
+  SetForegroundColour( parent->GetForegroundColour() );
 
   Show( TRUE );
 
@@ -106,30 +107,10 @@ void wxButton::Enable( bool enable )
   gtk_widget_set_sensitive( GTK_BUTTON(m_widget)->child, enable );
 }
 
-void wxButton::SetFont( const wxFont &font )
+void wxButton::ApplyWidgetStyle()
 {
-  wxCHECK_RET( m_widget != NULL, "invalid button" );
-  
-  wxControl::SetFont( font );
-  
-  gtk_widget_set_style( GTK_BUTTON(m_widget)->child, 
-    gtk_style_ref(
-      gtk_widget_get_style( m_widget ) ) );
-}
-
-void wxButton::SetBackgroundColour( const wxColour &colour )
-{
-  return;
-
-  wxCHECK_RET( m_widget != NULL, "invalid button" );
-
-  wxControl::SetBackgroundColour( colour );
-  
-  if (!m_backgroundColour.Ok()) return;
-  
-  gtk_widget_set_style( GTK_BUTTON(m_widget)->child, 
-    gtk_style_ref(
-      gtk_widget_get_style( m_widget ) ) );
+  SetWidgetStyle();
+  gtk_widget_set_style( m_widget, m_widgetStyle );
+  gtk_widget_set_style( GTK_BUTTON(m_widget)->child, m_widgetStyle );
 }
 
-