Revision: 2130
          http://vexi.svn.sourceforge.net/vexi/?rev=2130&view=rev
Author:   clrg
Date:     2007-09-06 08:55:52 -0700 (Thu, 06 Sep 2007)

Log Message:
-----------
More splitpane fixes

Modified Paths:
--------------
    trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/splitpane.t
    trunk/widgets/org.vexi.widgets/src/org/vexi/theme/win2k/splitpane.t

Modified: trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/splitpane.t
===================================================================
--- trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/splitpane.t  
2007-09-06 14:48:10 UTC (rev 2129)
+++ trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/splitpane.t  
2007-09-06 15:55:52 UTC (rev 2130)
@@ -38,8 +38,8 @@
             else if (0 > dim_r - xshift) xshift = dim_r;
             if (liveresize)
             {
-                cur_l.width = dim_l + xshift;
-                cur_r.width = dim_r - xshift;
+                if (cur_l != master) cur_l.width = dim_l + xshift;
+                if (cur_r != master) cur_r.width = dim_r - xshift;
             }
             else
             {
@@ -96,8 +96,8 @@
             th_marker.display = false;
             if (!liveresize)
             {
-                cur_l.height = tmp_l;
-                cur_r.height = tmp_r;
+                if (cur_l != master) cur_l.height = tmp_l;
+                if (cur_r != master) cur_r.height = tmp_r;
             }
             if (surface) surface.delMoveTrap(yMoveFunc);
             surface.Release1 --= yReleaseFunc;
@@ -130,8 +130,8 @@
             cur_d.active = true;
             cur_l = th_holding[cur-1];
             cur_r = th_holding[cur+1];
-            dim_l = cur_l[cur-1].height;
-            dim_r = cur_r[cur+1].height;
+            dim_l = cur_l.height;
+            dim_r = cur_r.height;
             my = surface.mouse.y;
             th_marker.display = !liveresize;
             th_marker.y = cur_l.y + cur_l.height - markeroffset;
@@ -171,7 +171,6 @@
         /** set up Children trap */
         th_content ++= function(v)
         {
-            v.numchildren ++= function() { return th_holding.numchildren+1 / 
2; }
             /** children are really stored in th_holding and separated by 
dividers */
             v.Children ++= function() { return 
th_holding[arguments.trapname*2]; }
             
@@ -188,22 +187,15 @@
                     if (th_holding.numchildren>0)
                     {
                         d = newdiv(vexi.box);
-                        if (orient == "horizontal")
-                        {
-                            d.orient = "vertical";
-                            d.Press1 ++= xPressFunc;
-                        }
-                        else
-                        {
-                            d.orient = "horizontal";
-                            d.Press1 ++= yPressFunc;
-                        }
+                        d.orient = flip(orient);
+                        d.Press1 ++= (orient == "horizontal" ? xPressFunc : 
yPressFunc);
                     }
                     // assign new child and divider to holding
                     if (d and i != 0) th_holding[i*2-1] = d;
                     th_holding[i*2] = c;
                     if (d and i == 0) th_holding[1] = d;
                     if (!master) master = c;
+                    // insert placeholder box
                     cascade = vexi.box;
                     return;
                 }
@@ -221,9 +213,11 @@
                 if (i == 0) th_holding[1] = null;
                 th_holding[i*2] = null;
                 if (i != 0) th_holding[i*2-1] = null;
+                // remove placeholder box
                 cascade = null;
             }
             
+            v.display = false;
             cascade = v;
         }
         

Modified: trunk/widgets/org.vexi.widgets/src/org/vexi/theme/win2k/splitpane.t
===================================================================
--- trunk/widgets/org.vexi.widgets/src/org/vexi/theme/win2k/splitpane.t 
2007-09-06 14:48:10 UTC (rev 2129)
+++ trunk/widgets/org.vexi.widgets/src/org/vexi/theme/win2k/splitpane.t 
2007-09-06 15:55:52 UTC (rev 2130)
@@ -10,8 +10,8 @@
         <ui:box id="holding" />
         <ui:box id="marker" display="false" fill="black" minwidth="2" 
minheight="2" />
         
+        thisbox.th_holding = $holding;
         thisbox.th_content = $content;
-        thisbox.th_holding = $holding;
         thisbox.th_marker = $marker;
         thisbox.markeroffset = 1;
         


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Vexi-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to