Reset wxStaticBitmap image when passed empty bitmap in wxGTK
This makes the behaviour consistent with the other ports. Closes #17420.
This commit is contained in:
committed by
Vadim Zeitlin
parent
5d9c578df3
commit
59b29a3a71
@@ -59,15 +59,15 @@ void wxStaticBitmap::SetBitmap( const wxBitmap &bitmap )
|
||||
{
|
||||
m_bitmap = bitmap;
|
||||
|
||||
if (m_bitmap.IsOk())
|
||||
{
|
||||
// always use pixbuf, because pixmap mask does not
|
||||
// work with disabled images in some themes
|
||||
if (m_bitmap.IsOk())
|
||||
gtk_image_set_from_pixbuf(GTK_IMAGE(m_widget), m_bitmap.GetPixbuf());
|
||||
else
|
||||
gtk_image_set_from_pixbuf(GTK_IMAGE(m_widget), NULL);
|
||||
|
||||
InvalidateBestSize();
|
||||
SetSize(GetBestSize());
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
|
||||
Reference in New Issue
Block a user