X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ad81651f00edc6f489d9b6a0839d316a964fd521..f1d93f0beeec9d88f8a225aa35a9ccc163dcdb15:/src/motif/statbmp.cpp?ds=sidebyside 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 ();