Use 16x16 default size for wxStaticBitmap in wxMotif too

Nobody cares about Motif, but still use the same default size there as
under the other platforms.
This commit is contained in:
Vadim Zeitlin 2021-10-21 22:23:19 +01:00
parent 0f9cb0fce1
commit 9ffa5cf4f0

View File

@ -58,9 +58,9 @@ bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID id,
wxSize actualSize(size);
// work around the cases where the bitmap is a wxNull(Icon/Bitmap)
if (actualSize.x == -1)
actualSize.x = bitmap.IsOk() ? bitmap.GetWidth() : 1;
actualSize.x = bitmap.IsOk() ? bitmap.GetWidth() : 16;
if (actualSize.y == -1)
actualSize.y = bitmap.IsOk() ? bitmap.GetHeight() : 1;
actualSize.y = bitmap.IsOk() ? bitmap.GetHeight() : 16;
PostCreation();
DoSetBitmap();