]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/button.cpp
tiny fixes
[wxWidgets.git] / src / gtk / button.cpp
index e1099660546cd92f80e5bb901f228c5befc4da68..0d2353b91862ebdcc9bc1b30fa49a4d38fa11880 100644 (file)
@@ -78,7 +78,7 @@ bool wxButton::Create(  wxWindow *parent, wxWindowID id, const wxString &label,
     if (!PreCreation( parent, pos, size ) ||
         !CreateBase( parent, id, pos, size, style, validator, name ))
     {
-        wxFAIL_MSG( _T("wxButton creation failed") );
+        wxFAIL_MSG( T("wxButton creation failed") );
        return FALSE;
     }
 
@@ -97,8 +97,17 @@ bool wxButton::Create(  wxWindow *parent, wxWindowID id, const wxString &label,
     GetTextExtent( m_label, &x, &y, (int*)NULL, (int*)NULL, &new_font );
 
     wxSize newSize = size;
-    if (newSize.x == -1) newSize.x = 12+x;
-    if (newSize.y == -1) newSize.y = 11+y;
+    if (newSize.x == -1)
+    {  
+        newSize.x = 12+x;
+       if (newSize.x < 80) newSize.x = 80;
+    }
+    if (newSize.y == -1)
+    {
+        newSize.y = 11+y;
+       if (newSize.x < 26) newSize.x = 26;
+    }
+       
     SetSize( newSize.x, newSize.y );
 
     gtk_signal_connect( GTK_OBJECT(m_widget), "clicked",
@@ -133,7 +142,7 @@ wxSize wxButton::GetDefaultSize()
 
 void wxButton::SetLabel( const wxString &label )
 {
-    wxCHECK_RET( m_widget != NULL, _T("invalid button") );
+    wxCHECK_RET( m_widget != NULL, T("invalid button") );
   
     wxControl::SetLabel( label );