X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/abdeb9e7006488bf917d90048fcd0cbe22f44a71..e5156e154a0fb21570d954bf0b699553989bcd47:/src/gtk1/statbmp.cpp diff --git a/src/gtk1/statbmp.cpp b/src/gtk1/statbmp.cpp index 9d206950ea..6ec5169750 100644 --- a/src/gtk1/statbmp.cpp +++ b/src/gtk1/statbmp.cpp @@ -113,9 +113,18 @@ void wxStaticBitmap::SetBitmap( const wxBitmap &bitmap ) gtk_pixmap_set( GTK_PIXMAP(m_widget), m_bitmap.GetPixmap(), mask ); } - SetBestSize(wxSize(bitmap.GetWidth(), bitmap.GetHeight())); + InvalidateBestSize(); + SetSize(GetBestSize()); } } +// static +wxVisualAttributes +wxStaticBitmap::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant)) +{ + // TODO: overload to allow using gtk_pixmap_new? + return GetDefaultAttributesFromGTKWidget(gtk_label_new); +} + #endif // wxUSE_STATBMP