Revision: 2473
          http://vexi.svn.sourceforge.net/vexi/?rev=2473&view=rev
Author:   clrg
Date:     2007-10-15 08:20:23 -0700 (Mon, 15 Oct 2007)

Log Message:
-----------
Nice initial layout of tables by giving columns starting size

Modified Paths:
--------------
    trunk/widgets/org.vexi.widgets/src/org/vexi/theme/win2k/column.t
    trunk/widgets/org.vexi.widgets/src/org/vexi/theme/win2k/table.t
    trunk/widgets/org.vexi.widgets/src/vexi/widget/table/column.t

Modified: trunk/widgets/org.vexi.widgets/src/org/vexi/theme/win2k/column.t
===================================================================
--- trunk/widgets/org.vexi.widgets/src/org/vexi/theme/win2k/column.t    
2007-10-15 13:45:46 UTC (rev 2472)
+++ trunk/widgets/org.vexi.widgets/src/org/vexi/theme/win2k/column.t    
2007-10-15 15:20:23 UTC (rev 2473)
@@ -14,28 +14,43 @@
     <ui:box redirect=":$content" padding="2 1">
         <button id="b" layout="place">
             <ui:box align="center">
-                <ui:box id="sort" align="right" shrink="true" />
-                <ui:box id="content" shrink="true" />
-                <ui:box id="spacer" />
+                <ui:box id="sort" align="right" shrink="true" width="8" />
+                <ui:box id="content" />
+                <ui:box id="spacer" shrink="true" width="8" />
             </ui:box>
         </button>
         
         /** assigns the correct sort arrow image */
         thisbox.sort ++= function(v) {
-            if (v == "ascending" or v == "asc")
+            if (v == "ascending" or v == "asc") {
                 $sort.fill = .image.arrowdown;
-            else if (v == "descending" or v == "desc")
+                $spacer.display = true;
+                $sort.display = true;
+            } else if (v == "descending" or v == "desc") {
                 $sort.fill = .image.arrowup;
-            else {
-                $sort.fill = null;
-                $sort.minwidth = 0;
+                $spacer.display = true;
+                $sort.display = true;
+            } else {
+                $spacer.display = false;
+                $sort.display = false;
             }
             cascade = v;
         }
         
+        var syncSize = function(v) {
+            cascade = v;
+            var h = vexi.ui.font.height(font, fontsize, "dy") + 6;
+            $b.minheight = h;
+        }
+        
+        th_content ++= function(v) {
+            v.font ++= syncSize;
+            v.fontsize ++= syncSize;
+            v.fontsize = v.fontsize;
+            cascade = v;
+        }
+        
         $b.action ++= function(v) { thisbox.action = true; cascade = v; }
-        $content.height ++= function(v) { $b.minheight = v + 6; cascade = v; }
-        $sort.width ++= function(v) { $spacer.minwidth = v; cascade = v; }
         
     </ui:box>
 </vexi>

Modified: trunk/widgets/org.vexi.widgets/src/org/vexi/theme/win2k/table.t
===================================================================
--- trunk/widgets/org.vexi.widgets/src/org/vexi/theme/win2k/table.t     
2007-10-15 13:45:46 UTC (rev 2472)
+++ trunk/widgets/org.vexi.widgets/src/org/vexi/theme/win2k/table.t     
2007-10-15 15:20:23 UTC (rev 2473)
@@ -12,7 +12,8 @@
         <ui:box vshrink="true">
             <ui:box id="headport" height="0" layout="place">
                 <ui:box id="headview" align="topleft" vshrink="true" />
-                $headview.height ++= function(v) { height = v; cascade = v; }
+                //$headview.height ++= function(v) { height = v; cascade = v; }
+                minheight = vexi.ui.font.height(font, fontsize, "dy") + 6;
             </ui:box>
             <ui:box id="topinset" shrink="true" />
         </ui:box>

Modified: trunk/widgets/org.vexi.widgets/src/vexi/widget/table/column.t
===================================================================
--- trunk/widgets/org.vexi.widgets/src/vexi/widget/table/column.t       
2007-10-15 13:45:46 UTC (rev 2472)
+++ trunk/widgets/org.vexi.widgets/src/vexi/widget/table/column.t       
2007-10-15 15:20:23 UTC (rev 2473)
@@ -12,6 +12,7 @@
     
     <column />
     <ui:box redirect=":$content" vshrink="true">
+        th_content = $content;
         <lay:pad id="pad">
             <ui:box id="content" />
         </lay:pad>


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