X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ec8c39ed09439735c6badab91142c13255d5b960..8de5b24e54bd7fec2a9e2011b2402b3f33117bd7:/src/gtk1/statbmp.cpp?ds=sidebyside diff --git a/src/gtk1/statbmp.cpp b/src/gtk1/statbmp.cpp index 36aba28da0..48a8dafe73 100644 --- a/src/gtk1/statbmp.cpp +++ b/src/gtk1/statbmp.cpp @@ -54,7 +54,7 @@ void wxStaticBitmap::CreatePixmapWidget() m_focusWidget = m_widget; - PostCreation(); + PostCreation(wxDefaultSize); } bool wxStaticBitmap::Create( wxWindow *parent, wxWindowID id, const wxBitmap &bitmap, @@ -78,8 +78,6 @@ bool wxStaticBitmap::Create( wxWindow *parent, wxWindowID id, const wxBitmap &bi if ( m_bitmap.GetMask() ) mask = m_bitmap.GetMask()->GetBitmap(); m_widget = gtk_pixmap_new( m_bitmap.GetPixmap(), mask ); - - SetBestSize( size ); } else { @@ -87,7 +85,7 @@ bool wxStaticBitmap::Create( wxWindow *parent, wxWindowID id, const wxBitmap &bi m_focusWidget = m_widget; } - PostCreation(); + PostCreation(size); m_parent->DoAddChild( this ); return TRUE; @@ -119,5 +117,13 @@ void wxStaticBitmap::SetBitmap( const wxBitmap &bitmap ) } } +// static +wxVisualAttributes +wxStaticBitmap::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant)) +{ + // TODO: overload to allow using gtk_pixmap_new? + return GetDefaultAttributesFromGTKWidget(gtk_label_new); +} + #endif // wxUSE_STATBMP