X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ad81651f00edc6f489d9b6a0839d316a964fd521..86f6187197555cf9a01bb1d4d546a6baf898c28f:/src/motif/statbmp.cpp diff --git a/src/motif/statbmp.cpp b/src/motif/statbmp.cpp index 9d8c27fd00..3d35638883 100644 --- a/src/motif/statbmp.cpp +++ b/src/motif/statbmp.cpp @@ -74,7 +74,13 @@ bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID id, ChangeFont(FALSE); SetCanAddEventHandler(TRUE); - AttachWidget (parent, m_mainWidget, (WXWidget) NULL, pos.x, pos.y, size.x, size.y); + + wxSize actualSize(size); + if (actualSize.x == -1) + actualSize.x = bitmap.GetWidth(); + if (actualSize.y == -1) + actualSize.y = bitmap.GetHeight(); + AttachWidget (parent, m_mainWidget, (WXWidget) NULL, pos.x, pos.y, actualSize.x, actualSize.y); ChangeBackgroundColour ();