Fix a bug in the resize asserts; fix another bug in the hBox implementation causing sizing and positioning of child widgets to fail.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5423 4a71c877-e1ca-e34f-864e-861f7616d084
master
Freddie Witherden 2008-07-08 16:46:53 +00:00
parent 22d4eb3fe1
commit f99660d986
2 changed files with 6 additions and 6 deletions

View File

@ -165,8 +165,8 @@ bool hBoxDoLayoutImpl(widget *self)
sizeInfo *childSize = &childSizeInfo[i];
// Set the size and offset
widgetResize(child, childSizeInfo->currentSize.x,
childSizeInfo->currentSize.y);
widgetResize(child, childSize->currentSize.x,
childSize->currentSize.y);
child->offset.x = temp;
child->offset.y = childSize->offset.y;

View File

@ -575,10 +575,10 @@ void widgetResizeImpl(widget *self, int w, int h)
const size minSize = widgetGetMinSize(self);
const size maxSize = widgetGetMaxSize(self);
assert(minSize.x < w);
assert(minSize.y < h);
assert(w < maxSize.x);
assert(h < maxSize.y);
assert(minSize.x <= w);
assert(minSize.y <= h);
assert(w <= maxSize.x);
assert(h <= maxSize.y);
self->size.x = w;
self->size.y = h;