Revision: 4323
          http://vexi.svn.sourceforge.net/vexi/?rev=4323&view=rev
Author:   clrg
Date:     2012-01-12 08:48:07 +0000 (Thu, 12 Jan 2012)
Log Message:
-----------
Only match option/combo width to list width if hshrink is set to true.

Modified Paths:
--------------
    trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/combo.t
    trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/option.t

Modified: trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/combo.t
===================================================================
--- trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/combo.t 
2012-01-12 07:57:01 UTC (rev 4322)
+++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/combo.t 
2012-01-12 08:48:07 UTC (rev 4323)
@@ -56,10 +56,10 @@
         // inherit static functions from classic.option
         thisbox.enabled ++= opt.enableWrite;
         thisbox.focused ++= .lib.focusborder..focusWrite;
+        thisbox.hshrink ++= opt.hshrinkWrite;
         thisbox.popup   ++= opt.popupWrite;
         thisbox.popdown ++= opt.popdownWrite;
         thisbox.width   ++= opt.widthWrite;
-        $content.contentwidth ++= opt.listwidthWrite;
         $content.contentheight ++= opt.contentheightWrite;
         
         thisbox.v_container ++= static.containerWrite;

Modified: trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/option.t
===================================================================
--- trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/option.t        
2012-01-12 07:57:01 UTC (rev 4322)
+++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/option.t        
2012-01-12 08:48:07 UTC (rev 4323)
@@ -29,6 +29,7 @@
         thisbox.th_arrow  = $arrow;
         thisbox.th_bevel  = $bevel;
         thisbox.th_button = $button;
+        thisbox.th_conetent = $content;
         thisbox.th_focus  = $focus;
         thisbox.th_scroll = $scroll;
         thisbox.v_init    = static.optioninit;
@@ -40,13 +41,13 @@
         thisbox.focused  ++= .lib.focusborder..focusWrite;
         thisbox.font     ++= static.fontWrite;
         thisbox.fontsize ++= static.fontWrite;
+        thisbox.hshrink  ++= static.hshrinkWrite;
         thisbox.popup    ++= static.popupWrite;
         thisbox.popdown  ++= static.popdownWrite;
         thisbox.visible  ++= static.visibleWrite;
         thisbox.width    ++= static.widthWrite;
         thisbox.surfaceWidth ++= static.surfaceWidthRead;
         thisbox.surfaceHeight ++= static.surfaceHeightRead;
-        $content.contentwidth ++= static.listwidthWrite;
         $content.contentheight ++= static.contentheightWrite;
         
         thisbox.v_container ++= function(v) {
@@ -136,6 +137,15 @@
         trapee.v_popbox.minwidth = vexi.math.max(0, surroundwidth-1);
     }
     
+    static.hshrinkWrite = function(v) {
+        cascade = v;
+        if (v) {
+            trapee.th_content.contentwidth ++= static.listwidthWrite;
+        } else {
+            trapee.th_content.contentwidth --= static.listwidthWrite;
+        }
+    }
+    
     /** match option width to list width */
     static.listwidthWrite = function(v) {
         cascade = v;

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


------------------------------------------------------------------------------
RSA(R) Conference 2012
Mar 27 - Feb 2
Save $400 by Jan. 27
Register now!
http://p.sf.net/sfu/rsa-sfdev2dev2
_______________________________________________
Vexi-svn mailing list
Vexi-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to