summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Nita <marius@cs.pdx.edu>2002-11-15 05:12:49 +0000
committerMarius Nita <marius@cs.pdx.edu>2002-11-15 05:12:49 +0000
commitc09095554429d93f2e1f4fef2d6028a523f6206c (patch)
tree6afa61a215a5f9b8b99b411c3c54631e0719d00b
parent5be1363981349a23637da6a6fc718ae48a7a6667 (diff)
heh
-rw-r--r--otk/widget.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/otk/widget.cc b/otk/widget.cc
index 96d958cb..42217d31 100644
--- a/otk/widget.cc
+++ b/otk/widget.cc
@@ -247,7 +247,7 @@ void OtkWidget::adjustHorz(void)
for (it = _children.begin(); it != end; ++it) {
tmp = *it;
- if (tmp->isStretchableVert())
+ if (tmp->isStretchableVert() && _rect.height() > _bevel_width * 2)
tmp->setHeight(_rect.height() - _bevel_width * 2);
if (tmp->isStretchableHorz())
stretchable.push_back(tmp);
@@ -302,7 +302,7 @@ void OtkWidget::adjustVert(void)
for (it = _children.begin(); it != end; ++it) {
tmp = *it;
- if (tmp->isStretchableHorz())
+ if (tmp->isStretchableHorz() && _rect.width() > _bevel_width * 2)
tmp->setWidth(_rect.width() - _bevel_width * 2);
if (tmp->isStretchableVert())
stretchable.push_back(tmp);
@@ -345,16 +345,16 @@ void OtkWidget::adjustVert(void)
void OtkWidget::update(void)
{
- OtkWidgetList::iterator it = _children.begin(), end = _children.end();
- for (; it != end; ++it)
- (*it)->update();
-
if (_dirty) {
adjust();
render();
XClearWindow(OBDisplay::display, _window);
}
+ OtkWidgetList::iterator it = _children.begin(), end = _children.end();
+ for (; it != end; ++it)
+ (*it)->update();
+
_dirty = false;
}