]> Dogcows Code - chaz/openbox/commitdiff
heh
authorMarius Nita <marius@cs.pdx.edu>
Fri, 15 Nov 2002 05:12:49 +0000 (05:12 +0000)
committerMarius Nita <marius@cs.pdx.edu>
Fri, 15 Nov 2002 05:12:49 +0000 (05:12 +0000)
otk/widget.cc

index 96d958cb84a71b0f9735469c9e25d9bb4a9e7fc6..42217d31ded30a337a5db9ac7c0273a5c9e52ca5 100644 (file)
@@ -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;
 }
 
This page took 0.022649 seconds and 4 git commands to generate.