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;
|
m_bitmap = bitmap;
|
||||||
|
|
||||||
|
// always use pixbuf, because pixmap mask does not
|
||||||
|
// work with disabled images in some themes
|
||||||
if (m_bitmap.IsOk())
|
if (m_bitmap.IsOk())
|
||||||
{
|
|
||||||
// always use pixbuf, because pixmap mask does not
|
|
||||||
// work with disabled images in some themes
|
|
||||||
gtk_image_set_from_pixbuf(GTK_IMAGE(m_widget), m_bitmap.GetPixbuf());
|
gtk_image_set_from_pixbuf(GTK_IMAGE(m_widget), m_bitmap.GetPixbuf());
|
||||||
|
else
|
||||||
|
gtk_image_set_from_pixbuf(GTK_IMAGE(m_widget), NULL);
|
||||||
|
|
||||||
InvalidateBestSize();
|
InvalidateBestSize();
|
||||||
SetSize(GetBestSize());
|
SetSize(GetBestSize());
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
|
|||||||
Reference in New Issue
Block a user