X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/abdeb9e7006488bf917d90048fcd0cbe22f44a71..ba763a45d85d8b70326da65895b7753f86fc3ea3:/src/gtk1/bmpbuttn.cpp diff --git a/src/gtk1/bmpbuttn.cpp b/src/gtk1/bmpbuttn.cpp index 17bc64454f..34f5bab890 100644 --- a/src/gtk1/bmpbuttn.cpp +++ b/src/gtk1/bmpbuttn.cpp @@ -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; }