X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e71aec80fd2c0d55067dd726ad1abbf5c102e168..7279a306bbef7f0965e6a1e36924bc2591f12f1e:/src/gtk/button.cpp diff --git a/src/gtk/button.cpp b/src/gtk/button.cpp index 2ce3e1d0a1..19c8d2521b 100644 --- a/src/gtk/button.cpp +++ b/src/gtk/button.cpp @@ -105,8 +105,6 @@ wxgtk_button_style_set_callback(GtkWidget* widget, GtkStyle*, wxButton* win) // wxButton //----------------------------------------------------------------------------- -IMPLEMENT_DYNAMIC_CLASS(wxButton,wxControl) - bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString &label, @@ -266,17 +264,13 @@ void wxButton::SetLabel( const wxString &lbl ) bool wxButton::Enable( bool enable ) { - bool isEnabled = IsEnabled(); - - if ( !wxControl::Enable( enable ) ) + if (!base_type::Enable(enable)) return false; gtk_widget_set_sensitive(GTK_BIN(m_widget)->child, enable); - if (!isEnabled && enable) - { + if (enable) GTKFixSensitivity(); - } GTKUpdateBitmap(); @@ -668,6 +662,7 @@ void wxButton::DoSetBitmapPosition(wxDirection dir) } gtk_button_set_image_position(GTK_BUTTON(m_widget), gtkpos); + InvalidateBestSize(); } #endif // GTK+ 2.10+ }