fixed Set(wxPercentOf) (bug #12227)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8818 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -69,7 +69,16 @@ void wxIndividualLayoutConstraint::Set(wxRelationship rel, wxWindowBase *otherW,
|
|||||||
relationship = rel;
|
relationship = rel;
|
||||||
otherWin = otherW;
|
otherWin = otherW;
|
||||||
otherEdge = otherE;
|
otherEdge = otherE;
|
||||||
|
|
||||||
|
if ( rel == wxPercentOf )
|
||||||
|
{
|
||||||
|
percentage = val;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
value = val;
|
value = val;
|
||||||
|
}
|
||||||
|
|
||||||
margin = marg;
|
margin = marg;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -98,18 +107,13 @@ void wxIndividualLayoutConstraint::Below(wxWindowBase *sibling, int marg)
|
|||||||
//
|
//
|
||||||
void wxIndividualLayoutConstraint::SameAs(wxWindowBase *otherW, wxEdge edge, int marg)
|
void wxIndividualLayoutConstraint::SameAs(wxWindowBase *otherW, wxEdge edge, int marg)
|
||||||
{
|
{
|
||||||
Set(wxPercentOf, otherW, edge, 0, marg);
|
Set(wxPercentOf, otherW, edge, 100, marg);
|
||||||
percent = 100;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// The edge is a percentage of the other window's edge
|
// The edge is a percentage of the other window's edge
|
||||||
void wxIndividualLayoutConstraint::PercentOf(wxWindowBase *otherW, wxEdge wh, int per)
|
void wxIndividualLayoutConstraint::PercentOf(wxWindowBase *otherW, wxEdge wh, int per)
|
||||||
{
|
{
|
||||||
otherWin = otherW;
|
Set(wxPercentOf, otherW, wh, per);
|
||||||
relationship = wxPercentOf;
|
|
||||||
percent = per;
|
|
||||||
|
|
||||||
otherEdge = wh;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
Reference in New Issue
Block a user