]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/radiobut.cpp
fixed wxSetEnv to correctly set variable in Unicode build
[wxWidgets.git] / src / gtk / radiobut.cpp
index c8c6c53ecae61a8df1e1a9a9f45848d3ebecef3b..c03a82e438a66b5684935008c37d4f93e33ee2ef 100644 (file)
@@ -128,19 +128,7 @@ bool wxRadioButton::Create( wxWindow *parent,
        
     m_parent->DoAddChild( this );
   
-    PostCreation();
-    InheritAttributes();
-
-    wxSize size_best( DoGetBestSize() );
-    wxSize new_size( size );
-    if (new_size.x == -1)
-        new_size.x = size_best.x;
-    if (new_size.y == -1)
-        new_size.y = size_best.y;
-    if ((new_size.x != size.x) || (new_size.y != size.y))
-        SetSize( new_size.x, new_size.y );
-        
-    Show( TRUE );
+    PostCreation(size);
 
     return TRUE;
 }
@@ -245,4 +233,16 @@ wxSize wxRadioButton::DoGetBestSize() const
     return wxControl::DoGetBestSize();
 }
 
+// static
+wxVisualAttributes
+wxRadioButton::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
+{
+    wxVisualAttributes attr;
+    GtkWidget* widget = gtk_radio_button_new_with_label(NULL, "");
+    attr = GetDefaultAttributesFromGTKWidget(widget);
+    gtk_widget_destroy(widget);
+    return attr;
+}
+
+
 #endif