diff mde/gui/widget/Floating.d @ 144:66c58e5b0062

Added a BoolContent-based collapsible widget.
author Diggory Hardy <diggory.hardy@gmail.com>
date Tue, 10 Feb 2009 12:57:09 +0000
parents 29a524e7c858
children 075705ad664a
line wrap: on
line diff
--- a/mde/gui/widget/Floating.d	Mon Feb 09 23:27:41 2009 +0000
+++ b/mde/gui/widget/Floating.d	Tue Feb 10 12:57:09 2009 +0000
@@ -63,7 +63,7 @@
         debug (mdeWidgets) logger.trace ("FloatingAreaWidget.setup");
         foreach (i, ref d; sWData) with (d) {
             auto widg = subWidgets[i];
-	    if (!widg.setup (n, flags) && n != 0 && !(flags & 1))
+	    if (!widg.setup (n, flags) && !(flags & 1))
 		continue;	// no changes; skip the rest
 	    
 	    d.border = mgr.renderer.getBorder (borderType, widg.isWSizable, widg.isHSizable);
@@ -74,7 +74,7 @@
             widg.setWidth  (w - border.x1 - border.x2, -1);
             widg.setHeight (h - border.y1 - border.y2, -1);
         }
-	return false;	// floating area size is not changed
+	return n == 0;	// floating area size is not changed
     }
     
     override bool saveChanges () {