X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5f7bcb48fd9a642036a3bf5c70e2b0c9576df1b1..c687b303a5040da07009ea93504121aeec56682a:/src/motif/button.cpp

diff --git a/src/motif/button.cpp b/src/motif/button.cpp
index 93189fd2a7..65349d549d 100644
--- a/src/motif/button.cpp
+++ b/src/motif/button.cpp
@@ -76,7 +76,7 @@ bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& lbl,
     m_mainWidget = (WXWidget) XtVaCreateManagedWidget ("button",
         xmPushButtonWidgetClass,
         parentWidget,
-        wxFont::GetFontTag(), m_font.GetFontType(XtDisplay(parentWidget)),
+        wxFont::GetFontTag(), m_font.GetFontTypeC(XtDisplay(parentWidget)),
         XmNlabelString, text(),
         XmNrecomputeSize, False,
         // See comment for wxButton::SetDefault
@@ -123,6 +123,7 @@ void wxButton::SetDefaultShadowThicknessAndResize()
     if( best != actual )
         SetSize( best );
 #endif
+    InvalidateBestSize();
 }
 
 
@@ -182,6 +183,19 @@ wxSize wxButton::DoGetBestSize() const
     return best;
 }
 
+wxSize wxButton::GetMinSize() const
+{
+    if( wxMotifLargeButtons() )
+        return OldGetMinSize();
+
+    return DoGetBestSize();
+}
+
+wxSize wxButton::OldGetMinSize() const
+{
+    return OldGetBestSize();
+}
+
 wxSize wxButton::OldGetBestSize() const
 {
     Dimension xmargin, ymargin, highlight, shadow, defThickness;
@@ -199,6 +213,7 @@ wxSize wxButton::OldGetBestSize() const
 
     int margin = highlight * 2 +
         ( defThickness ? ( ( shadow + defThickness ) * 4 ) : ( shadow * 2 ) );
+
     wxSize best( x + xmargin * 2 + margin,
                  y + ymargin * 2 + margin );