X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/850ff4855026066770d80c376ee6fc864169509c..ee3510132b8b4160f848bd4f502a6f5315f90dbc:/src/gtk1/button.cpp diff --git a/src/gtk1/button.cpp b/src/gtk1/button.cpp index 4fd565e8dc..d594d37e26 100644 --- a/src/gtk1/button.cpp +++ b/src/gtk1/button.cpp @@ -4,13 +4,17 @@ // Author: Robert Roebling // Id: $Id$ // Copyright: (c) 1998 Robert Roebling -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifdef __GNUG__ #pragma implementation "button.h" #endif +#include "wx/defs.h" + +#if wxUSE_BUTTON + #include "wx/button.h" #include @@ -77,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; } /* @@ -85,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() ); @@ -182,7 +186,14 @@ 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; } +#endif // wxUSE_BUTTON +