#if wxUSE_CHECKBOX
-#include "gdk/gdk.h"
-#include "gtk/gtk.h"
+#include <gdk/gdk.h>
+#include <gtk/gtk.h>
//-----------------------------------------------------------------------------
// idle system
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",
UpdateWindowUI();
}
+wxSize wxCheckBox::DoGetBestSize() const
+{
+ return wxSize( 25 + gdk_string_measure( m_widgetCheckbox->style->font,
+ m_label.mbc_str() ), 26 );
+}
+
#endif