]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/checkbox.cpp
Fixing another hard-coded WXDIR path
[wxWidgets.git] / src / gtk1 / checkbox.cpp
index 2729438afb6606c88ba1b404194bf098738c5e72..3e3b959f4f5f3e8468a18aa453bb7f0e48cee548 100644 (file)
@@ -16,8 +16,8 @@
 
 #if wxUSE_CHECKBOX
 
 
 #if wxUSE_CHECKBOX
 
-#include "gdk/gdk.h"
-#include "gtk/gtk.h"
+#include <gdk/gdk.h>
+#include <gtk/gtk.h>
 
 //-----------------------------------------------------------------------------
 // idle system
 
 //-----------------------------------------------------------------------------
 // idle system
@@ -106,16 +106,7 @@ bool wxCheckBox::Create(wxWindow *parent,
         m_widget = m_widgetCheckbox;
     }
 
         m_widget = m_widgetCheckbox;
     }
 
-    wxSize newSize(size);
-    if (newSize.x == -1)
-    {
-        newSize.x = 25 + gdk_string_measure( m_widgetCheckbox->style->font,
-                                             m_label.mbc_str() );
-    }
-    if (newSize.y == -1)
-        newSize.y = 26;
-
-    SetSize( newSize.x, newSize.y );
+    SetSizeOrDefault( size );
 
     gtk_signal_connect( GTK_OBJECT(m_widgetCheckbox),
                         "clicked",
 
     gtk_signal_connect( GTK_OBJECT(m_widgetCheckbox),
                         "clicked",
@@ -210,4 +201,10 @@ void wxCheckBox::OnInternalIdle()
     UpdateWindowUI();
 }
 
     UpdateWindowUI();
 }
 
+wxSize wxCheckBox::DoGetBestSize() const
+{
+    return wxSize( 25 + gdk_string_measure( m_widgetCheckbox->style->font,
+                                            m_label.mbc_str() ), 26 );
+}
+
 #endif
 #endif