Bugfix: Inverse layout reflowing.

Bugfix: Glitches with several layouts when using Aspect Ratio Correction.

svn-id: r33764
This commit is contained in:
Vicent Marti 2008-08-10 18:26:14 +00:00
parent 8a31616f46
commit 559c19e9f4
6 changed files with 55 additions and 25 deletions

View file

@ -124,8 +124,11 @@ void ThemeLayoutVertical::reflowLayout() {
if (autoWidget != -1 && autoWidget != (int)i) {
_children[autoWidget]->setHeight(_children[autoWidget]->getHeight() - (_children[i]->getHeight() + _spacing));
for (int j = autoWidget - 1; j >= 0; --j)
if (_reverse) for (int j = autoWidget - 1; j >= 0; --j)
_children[j]->setY(-(_children[i]->getHeight() + _spacing));
else
_children[i]->setY(-2 * (_children[i]->getHeight() + _spacing));
} else {
_h += _children[i]->getHeight() + _spacing;
}
@ -172,8 +175,11 @@ void ThemeLayoutHorizontal::reflowLayout() {
if (autoWidget != -1 && autoWidget != (int)i) {
_children[autoWidget]->setWidth(_children[autoWidget]->getWidth() - (_children[i]->getWidth() + _spacing));
for (int j = autoWidget - 1; j >= 0; --j)
if (_reverse) for (int j = autoWidget - 1; j >= 0; --j)
_children[j]->setX(-(_children[i]->getWidth() + _spacing));
else
_children[i]->setX(-2 * (_children[i]->getWidth() + _spacing));
} else {
_w += _children[i]->getWidth() + _spacing;
}