X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/078a0f54448b16486d590cddf64952422e8133a9..3fbf8e7f3b144f649464f89c850efe43be847235:/src/xrc/xh_sizer.cpp diff --git a/src/xrc/xh_sizer.cpp b/src/xrc/xh_sizer.cpp index 1eaa247c51..2e3f3e4908 100644 --- a/src/xrc/xh_sizer.cpp +++ b/src/xrc/xh_sizer.cpp @@ -71,7 +71,7 @@ wxSizerXmlHandler::wxSizerXmlHandler() XRC_ADD_STYLE(wxALIGN_CENTRE_VERTICAL); XRC_ADD_STYLE(wxADJUST_MINSIZE); - XRC_ADD_STYLE(wxFIXED_SIZE); + XRC_ADD_STYLE(wxFIXED_MINSIZE); } @@ -122,7 +122,6 @@ wxObject* wxSizerXmlHandler::Handle_sizeritem() { // create a sizer item for it wxSizerItem* sitem = MakeSizerItem(); - SetSizerItemAttributes(sitem); // now fetch the item to be managed bool old_gbs = m_isGBS; @@ -146,6 +145,9 @@ wxObject* wxSizerXmlHandler::Handle_sizeritem() else wxLogError(wxT("Error in resource.")); + // finally, set other wxSizerItem attributes + SetSizerItemAttributes(sitem); + AddSizerItem(sitem); return item; } @@ -339,7 +341,7 @@ void wxSizerXmlHandler::SetSizerItemAttributes(wxSizerItem* sitem) sitem->SetBorder(GetDimension(wxT("border"))); wxSize sz = GetSize(wxT("minsize")); if (!(sz == wxDefaultSize)) - sitem->SetInitSize(sz.x, sz.y); + sitem->SetMinSize(sz); sz = GetSize(wxT("ratio")); if (!(sz == wxDefaultSize)) sitem->SetRatio(sz);