Revision: 3995
          http://vexi.svn.sourceforge.net/vexi/?rev=3995&view=rev
Author:   clrg
Date:     2011-01-21 03:30:38 +0000 (Fri, 21 Jan 2011)

Log Message:
-----------
Fix cursor-related logic getting fired when cWord was invalid

Modified Paths:
--------------
    trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/text/default.t
    trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/text/edit.t
    trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/text/field.t
    trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/combo.t

Modified: trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/text/default.t
===================================================================
--- trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/text/default.t    
2011-01-18 15:18:14 UTC (rev 3994)
+++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/text/default.t    
2011-01-21 03:30:38 UTC (rev 3995)
@@ -7,6 +7,8 @@
     </meta:doc>
     
     <ui:box redirect=":$edit">
+        // need a separate containing box because this template is designed to
+        // be pre-applied and the topmost-box layout properties may get altered
         <ui:box align="topleft" layout="layer">
             <text.edit id="edit" />
             <role.repeatable id="cursor" display="false" fill="black" 
interval="300" width="1">

Modified: trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/text/edit.t
===================================================================
--- trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/text/edit.t       
2011-01-18 15:18:14 UTC (rev 3994)
+++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/text/edit.t       
2011-01-21 03:30:38 UTC (rev 3995)
@@ -1803,10 +1803,6 @@
                 } else {
                     // singleline
                     thisbox[0].text = t;
-                    thisbox[0].font = font;
-                    thisbox[0].fontsize = fontsize;
-                    thisbox[0].textalign = textalign;
-                    thisbox[0].textcolor = textcolor;
                 }
             }
             

Modified: trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/text/field.t
===================================================================
--- trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/text/field.t      
2011-01-18 15:18:14 UTC (rev 3994)
+++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/text/field.t      
2011-01-21 03:30:38 UTC (rev 3995)
@@ -35,7 +35,8 @@
             var viewtoedit   = th_view.distanceto(v_edit).x;
             var porttocursor = th_viewport.distanceto(v_cursor).x;
             var vieweditend  = th_view.width - v_edit.width - viewtoedit;
-            if (v_edit.getCWord() == null or th_viewport.width >= 
th_view.width) {
+            
+            if (v_cursor.x == 0 or v_edit.getCWord() == null or 
th_viewport.width >= th_view.width) {
                 // no word - set to 0
                 th_view.x = 0;
                 
@@ -168,6 +169,7 @@
             }
             if (cursor and sync) {
                 cursor.x --= sync;
+                trapee.th_view.width --= sync;
                 trapee.th_viewport.width --= sync;
             }
             // wrap in a try/catch so not to break the focus model

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 
2011-01-18 15:18:14 UTC (rev 3994)
+++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/combo.t 
2011-01-21 03:30:38 UTC (rev 3995)
@@ -10,10 +10,10 @@
     <lib:widget.shadowtext redirect=":$content" margin="3" maxlistheight="160" 
vshrink="true">
         <bevel form="down">
             <focusborder id="focus" align="topleft" layout="place">
-                <lib:layout.pad id="pad" padding="3">
+                <lib:layout.pad id="pad" hshrink="true" padding="3">
                     <lib:text.default id="edit" textalign="left" 
vshrink="true" />
                 </lib:layout.pad>
-                <lib:layout.pad id="shadowpad" padding="3" vshrink="true">
+                <lib:layout.pad id="shadowpad" padding="3" shrink="true">
                     <ui:box id="shadow" align="left" textcolor="#999999" />
                 </lib:layout.pad>
             </focusborder>


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

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Vexi-svn mailing list
Vexi-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to