Revision: 2394
          http://vexi.svn.sourceforge.net/vexi/?rev=2394&view=rev
Author:   clrg
Date:     2007-10-01 14:18:36 -0700 (Mon, 01 Oct 2007)

Log Message:
-----------
Fixes for splitpane
- initialise markers correctly
- assign master to first non-shrunk child

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-10-01 21:14:50 UTC (rev 2393)
+++ trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/splitpane.t  
2007-10-01 21:18:36 UTC (rev 2394)
@@ -135,7 +135,9 @@
                     if (th_holding.numchildren>0)
                     {
                         d = newdiv(vexi.box);
-                        d.orient = orient;
+                        d[shr] = true;
+                        d[flip(shr)] = false;
+                        d.align="topleft";
                         d.Press1 ++= pressFunc;
                     }
                     // assign new child and divider to holding
@@ -143,7 +145,8 @@
                     th_holding[i*2] = c;
                     if (d and i == 0) th_holding[1] = d;
                     // we rely on boxes being shrunk so slack is assigned to 
master
-                    c[shr] = true;
+                    if (master) c[shr] = true;
+                    else if (!c[shr]) master = c;
                     // insert placeholder box
                     cascade = vexi.box;
                     return;

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-10-01 21:14:50 UTC (rev 2393)
+++ trunk/widgets/org.vexi.widgets/src/org/vexi/theme/win2k/splitpane.t 
2007-10-01 21:18:36 UTC (rev 2394)
@@ -8,27 +8,27 @@
     <splitpane redirect=":$content" layout="place">
         <ui:box id="content" display="false" />
         <ui:box id="holding" align="topleft" />
-        <ui:box id="marker" align="topleft" display="false" fill="black" 
minwidth="2" minheight="2" />
+        <ui:box id="marker" align="topleft" display="false" fill="black" 
hshrink="true" minwidth="2" minheight="2" />
         
         thisbox.th_holding = $holding;
         thisbox.th_content = $content;
         thisbox.th_marker = $marker;
         thisbox.markeroffset = 2;
         
-        thisbox.orient ++= function(v)
-        {
-            if (v == "h" or v == "horizontal")
-            {
-                $marker.hshrink = true;
-                $marker.vshrink = false;
-            }
-            else
-            {
-                $marker.hshrink = false;
-                $marker.vshrink = true;
-            }
-            cascade = v;
-        }
+        thisbox.orient ++= static.orientWrite;
         
     </splitpane>
+        
+    static.orientWrite = function(v) {
+        var t = trapee;
+        if (v == "h" or v == "horizontal") {
+            t.th_marker.hshrink = true;
+            t.th_marker.vshrink = false;
+        } else {
+            t.th_marker.hshrink = false;
+            t.th_marker.vshrink = true;
+        }
+        cascade = v;
+    }
+    
 </vexi>


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: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Vexi-svn mailing list
Vexi-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to