]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/radiobut.cpp
* Added wxsocket lib and sample (I hope I don't forget some file)
[wxWidgets.git] / src / gtk1 / radiobut.cpp
index 321210ec3da6d40f00c5734d65965ec5cb31ebac..a0e789bcbd65814a3fedd275062779d76e430941 100644 (file)
@@ -86,4 +86,27 @@ bool wxRadioButton::GetValue(void) const
   return GTK_TOGGLE_BUTTON(m_widget)->active;
 }
 
+void wxRadioButton::SetFont( const wxFont &font )
+{
+  m_font = font;
+  
+  GtkButton *bin = GTK_BUTTON( m_widget );
+  GtkWidget *label = bin->child;
+  
+  GtkStyle *style = (GtkStyle*) NULL;
+  if (!m_hasOwnStyle)
+  {
+    m_hasOwnStyle = TRUE;
+    style = gtk_style_copy( gtk_widget_get_style( label ) );
+  }
+  else
+  {
+    style = gtk_widget_get_style( label );
+  }
+  
+  gdk_font_unref( style->font );
+  style->font = gdk_font_ref( m_font.GetInternalFont( 1.0 ) );
+  
+  gtk_widget_set_style( label, style );
+}