X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/14f355c2b5c71fc7c3d680aea366582d2ac60f7b..dc302518e6bf48326d202475bf78874fedcb2d9c:/src/gtk/statbmp.cpp diff --git a/src/gtk/statbmp.cpp b/src/gtk/statbmp.cpp index e069dbfbf2..48a8dafe73 100644 --- a/src/gtk/statbmp.cpp +++ b/src/gtk/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,22 +78,16 @@ 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 { m_widget = gtk_label_new( "Bitmap" ); - m_focusWidget = m_widget; - - PostCreation(); } + PostCreation(size); m_parent->DoAddChild( this ); - Show( TRUE ); - return TRUE; } @@ -123,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