use GetBestSize() and not GetSize() for AsIs() size constraints -- this makes much more sense
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30094 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -211,6 +211,7 @@ All:
|
|||||||
All (GUI):
|
All (GUI):
|
||||||
|
|
||||||
- recursive wxSizer::GetItem returns item of given window, sizer or nth index
|
- recursive wxSizer::GetItem returns item of given window, sizer or nth index
|
||||||
|
- wxLayoutConstraints now use best size, not current size, for AsIs() condition
|
||||||
|
|
||||||
Unix:
|
Unix:
|
||||||
|
|
||||||
|
@@ -300,7 +300,7 @@ bool wxIndividualLayoutConstraint::SatisfyConstraint(wxLayoutConstraints *constr
|
|||||||
{
|
{
|
||||||
int x, y;
|
int x, y;
|
||||||
int w, h;
|
int w, h;
|
||||||
win->GetSize(&w, &h);
|
win->GetBestSize(&w, &h);
|
||||||
win->GetPosition(&x, &y);
|
win->GetPosition(&x, &y);
|
||||||
value = x + w;
|
value = x + w;
|
||||||
done = true;
|
done = true;
|
||||||
@@ -453,7 +453,7 @@ bool wxIndividualLayoutConstraint::SatisfyConstraint(wxLayoutConstraints *constr
|
|||||||
{
|
{
|
||||||
int x, y;
|
int x, y;
|
||||||
int w, h;
|
int w, h;
|
||||||
win->GetSize(&w, &h);
|
win->GetBestSize(&w, &h);
|
||||||
win->GetPosition(&x, &y);
|
win->GetPosition(&x, &y);
|
||||||
value = h + y;
|
value = h + y;
|
||||||
done = true;
|
done = true;
|
||||||
@@ -621,7 +621,7 @@ bool wxIndividualLayoutConstraint::SatisfyConstraint(wxLayoutConstraints *constr
|
|||||||
if (win)
|
if (win)
|
||||||
{
|
{
|
||||||
int h;
|
int h;
|
||||||
win->GetSize(&value, &h);
|
win->GetBestSize(&value, &h);
|
||||||
done = true;
|
done = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -679,7 +679,7 @@ bool wxIndividualLayoutConstraint::SatisfyConstraint(wxLayoutConstraints *constr
|
|||||||
if (win)
|
if (win)
|
||||||
{
|
{
|
||||||
int w;
|
int w;
|
||||||
win->GetSize(&w, &value);
|
win->GetBestSize(&w, &value);
|
||||||
done = true;
|
done = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user