This commit is contained in:
Marius Nita 2002-11-15 05:12:49 +00:00
parent 5be1363981
commit c090955544

View file

@ -247,7 +247,7 @@ void OtkWidget::adjustHorz(void)
for (it = _children.begin(); it != end; ++it) { for (it = _children.begin(); it != end; ++it) {
tmp = *it; tmp = *it;
if (tmp->isStretchableVert()) if (tmp->isStretchableVert() && _rect.height() > _bevel_width * 2)
tmp->setHeight(_rect.height() - _bevel_width * 2); tmp->setHeight(_rect.height() - _bevel_width * 2);
if (tmp->isStretchableHorz()) if (tmp->isStretchableHorz())
stretchable.push_back(tmp); stretchable.push_back(tmp);
@ -302,7 +302,7 @@ void OtkWidget::adjustVert(void)
for (it = _children.begin(); it != end; ++it) { for (it = _children.begin(); it != end; ++it) {
tmp = *it; tmp = *it;
if (tmp->isStretchableHorz()) if (tmp->isStretchableHorz() && _rect.width() > _bevel_width * 2)
tmp->setWidth(_rect.width() - _bevel_width * 2); tmp->setWidth(_rect.width() - _bevel_width * 2);
if (tmp->isStretchableVert()) if (tmp->isStretchableVert())
stretchable.push_back(tmp); stretchable.push_back(tmp);
@ -345,16 +345,16 @@ void OtkWidget::adjustVert(void)
void OtkWidget::update(void) void OtkWidget::update(void)
{ {
OtkWidgetList::iterator it = _children.begin(), end = _children.end();
for (; it != end; ++it)
(*it)->update();
if (_dirty) { if (_dirty) {
adjust(); adjust();
render(); render();
XClearWindow(OBDisplay::display, _window); XClearWindow(OBDisplay::display, _window);
} }
OtkWidgetList::iterator it = _children.begin(), end = _children.end();
for (; it != end; ++it)
(*it)->update();
_dirty = false; _dirty = false;
} }