Revision: 4718
          http://sourceforge.net/p/vexi/code/4718
Author:   clrg
Date:     2014-08-28 14:43:41 +0000 (Thu, 28 Aug 2014)
Log Message:
-----------
Fix issues with setting v_textbox
- pad should not intercept v_textbox if already specified
- margin to only set v_textbox in direct implementation

Modified Paths:
--------------
    branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/lib/layout/margin.t
    branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/lib/layout/pad.t
    branches/vexi3/org.vexi-vexi.widgets/src_main/vexi/layout/margin.t
    branches/vexi3/org.vexi-vexi.widgets/src_main/vexi/layout/pad.t

Modified: 
branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/lib/layout/margin.t
===================================================================
--- branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/lib/layout/margin.t  
2014-08-28 13:40:29 UTC (rev 4717)
+++ branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/lib/layout/margin.t  
2014-08-28 14:43:41 UTC (rev 4718)
@@ -1,13 +1,15 @@
-<!-- Copyright 2009 - see COPYING for details [LGPL] -->
+<!-- Copyright 2014 - see COPYING for details [LGPL] -->
 
-<vexi xmlns:ui="vexi://ui" xmlns:meta="vexi://meta"
-    xmlns:rdt="vexi.util.redirect"
-    xmlns:pad="org.vexi.lib.layout.pad">
+<vexi xmlns:ui="vexi://ui"
+      xmlns:meta="vexi://meta"
+      xmlns:rdt="vexi.util.redirect"
+      xmlns:pad="org.vexi.lib.layout.pad">
+
     <meta:doc>
-        <author>Charles Goodwin</author>
-        <todo>
+        <notes>
+            * lib.margin does not set v_textbox
             * see org.vexi.lib.layout.pad
-        </todo>
+        </notes>
     </meta:doc>
 
     <ui:box redirect=":$content">
@@ -21,7 +23,7 @@
         
         thisbox.v_content = $content;
         thisbox.v_fillbox = $content;
-        thisbox.v_textbox = $content;
+        
         thisbox.v_tmar = $top;
         thisbox.v_rmar = $right;
         thisbox.v_bmar = $bottom;

Modified: 
branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/lib/layout/pad.t
===================================================================
--- branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/lib/layout/pad.t     
2014-08-28 13:40:29 UTC (rev 4717)
+++ branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/lib/layout/pad.t     
2014-08-28 14:43:41 UTC (rev 4718)
@@ -1,11 +1,12 @@
-<!-- Copyright 2009 - see COPYING for details [LGPL] -->
+<!-- Copyright 2014 - see COPYING for details [LGPL] -->
 
-<vexi xmlns:ui="vexi://ui" xmlns:meta="vexi://meta"
-    xmlns:rdt="vexi.util.redirect">
+<vexi xmlns:ui="vexi://ui"
+      xmlns:meta="vexi://meta"
+      xmlns:rdt="vexi.util.redirect">
+    
     <meta:doc>
-        <author>Charles Goodwin</author>
         <notes>
-            * differentiate between pt and px
+            * currently only works in px
             * changing individual pads (top/left etc) does not update 
'padding' property
         </notes>
     </meta:doc>
@@ -25,8 +26,14 @@
             thisbox.v_fillbox = v_content ? v_content : thisbox;
         }
         
+        // widgets may set their own textbox
+        if (thisbox.v_textbox==null) {
+            thisbox.v_textbox = $content;
+        }
+        
+        // always want to override v_content
         thisbox.v_content = $content;
-        thisbox.v_textbox = $content;
+        
         thisbox.v_tpad = $top;
         thisbox.v_rpad = $right;
         thisbox.v_bpad = $bottom;

Modified: branches/vexi3/org.vexi-vexi.widgets/src_main/vexi/layout/margin.t
===================================================================
--- branches/vexi3/org.vexi-vexi.widgets/src_main/vexi/layout/margin.t  
2014-08-28 13:40:29 UTC (rev 4717)
+++ branches/vexi3/org.vexi-vexi.widgets/src_main/vexi/layout/margin.t  
2014-08-28 14:43:41 UTC (rev 4718)
@@ -1,8 +1,10 @@
-<!-- Copyright 2009 - see COPYING for details [LGPL] -->
+<!-- Copyright 2014 - see COPYING for details [LGPL] -->
 
-<vexi xmlns:ui="vexi://ui" xmlns:meta="vexi://meta" 
xmlns="org.vexi.lib.layout">
+<vexi xmlns:ui="vexi://ui"
+      xmlns:meta="vexi://meta"
+      xmlns="org.vexi.lib.layout">
+
     <meta:doc>
-        <author>Charles Goodwin</author>
         <name>Margin</name>
         <desc>Use for adding a flexible margin to templates</desc>
         <usage>
@@ -18,17 +20,14 @@
                Putting a numeric value to these properties sets the
                respective margin.
             
-            * v_margin
-               By default margin will apply to 'thisbox' but to use
-               margin in more complicated situations, set the v_margin
-               property to the box you wish to be the margin.
-            
             Notes:
             
             * Do not preapply this template - preapply lib.layout.margin
         </usage>
     </meta:doc>
 
-    <margin />
+    <margin>
+        thisbox.v_textbox = v_content;
+    </margin>
     <container />
 </vexi>

Modified: branches/vexi3/org.vexi-vexi.widgets/src_main/vexi/layout/pad.t
===================================================================
--- branches/vexi3/org.vexi-vexi.widgets/src_main/vexi/layout/pad.t     
2014-08-28 13:40:29 UTC (rev 4717)
+++ branches/vexi3/org.vexi-vexi.widgets/src_main/vexi/layout/pad.t     
2014-08-28 14:43:41 UTC (rev 4718)
@@ -1,9 +1,10 @@
-<!-- Copyright 2009 - see COPYING for details [LGPL] -->
+<!-- Copyright 2014 - see COPYING for details [LGPL] -->
 
-<vexi xmlns:ui="vexi://ui" xmlns:meta="vexi://meta" xmlns="org.vexi.lib.layout"
-    xmlns:rdt="vexi.util.redirect">
+<vexi xmlns:ui="vexi://ui"
+      xmlns:meta="vexi://meta"
+      xmlns="org.vexi.lib.layout">
+
     <meta:doc>
-        <author>Charles Goodwin</author>
         <name>Padding</name>
         <desc>Use for adding a flexible padding to templates</desc>
         <usage>

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


------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Vexi-svn mailing list
Vexi-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to