]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/bmpbuttn.cpp
allow a - at the beginning of a menu item (would become a separator by default)
[wxWidgets.git] / src / gtk / bmpbuttn.cpp
index 55c431e1351c96e66f9a9c15d41d394caf81fc97..34f5bab8900580bc87501f81f22cb9232176b5b7 100644 (file)
@@ -4,7 +4,7 @@
 // Author:      Robert Roebling
 // Id:          $Id$
 // Copyright:   (c) 1998 Robert Roebling
-// Licence:     wxWidgets licence
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
@@ -193,18 +193,20 @@ wxString wxBitmapButton::GetLabel() const
     return wxControl::GetLabel();
 }
 
-void wxBitmapButton::ApplyWidgetStyle()
+void wxBitmapButton::DoApplyWidgetStyle(GtkRcStyle *style)
 {
     if ( !BUTTON_CHILD(m_widget) )
         return;
 
-    wxButton::ApplyWidgetStyle();
+    wxButton::DoApplyWidgetStyle(style);
 }
 
 void wxBitmapButton::OnSetBitmap()
 {
     wxCHECK_RET( m_widget != NULL, wxT("invalid bitmap button") );
 
+    InvalidateBestSize();
+    
     wxBitmap the_one;
     if (!m_isEnabled)
         the_one = m_bmpDisabled;
@@ -258,6 +260,7 @@ wxSize wxBitmapButton::DoGetBestSize() const
         best.x = m_bmpNormal.GetWidth()+border;
         best.y = m_bmpNormal.GetHeight()+border;
     }
+    CacheBestSize(best);
     return best;
 }