X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1e6feb95a79834836e88143b15d9f424ebe79621..4a46a5df879c4f820d0a0a435b34c7d5e4793991:/src/gtk/button.cpp diff --git a/src/gtk/button.cpp b/src/gtk/button.cpp index 01b3283adc..d594d37e26 100644 --- a/src/gtk/button.cpp +++ b/src/gtk/button.cpp @@ -4,7 +4,7 @@ // Author: Robert Roebling // Id: $Id$ // Copyright: (c) 1998 Robert Roebling -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifdef __GNUG__ @@ -81,7 +81,7 @@ bool wxButton::Create( wxWindow *parent, wxWindowID id, const wxString &label, !CreateBase( parent, id, pos, size, style, validator, name )) { wxFAIL_MSG( wxT("wxButton creation failed") ); - return FALSE; + return FALSE; } /* @@ -89,7 +89,7 @@ bool wxButton::Create( wxWindow *parent, wxWindowID id, const wxString &label, for (size_t i = 0; i < label2.Len(); i++) { if (label2.GetChar(i) == wxT('&')) - label2.SetChar(i,wxT('_')); + label2.SetChar(i,wxT('_')); } GtkWidget *accel_label = gtk_accel_label_new( label2.mb_str() ); @@ -186,7 +186,12 @@ void wxButton::ApplyWidgetStyle() wxSize wxButton::DoGetBestSize() const { wxSize ret( wxControl::DoGetBestSize() ); - if (ret.x < 80) ret.x = 80; + + if (!HasFlag(wxBU_EXACTFIT)) + { + if (ret.x < 80) ret.x = 80; + } + return ret; }