Revision: 4348 http://vexi.svn.sourceforge.net/vexi/?rev=4348&view=rev Author: clrg Date: 2012-02-01 03:07:59 +0000 (Wed, 01 Feb 2012) Log Message: ----------- Fix cursor display on empty right aligned text / shadowtext
Modified Paths: -------------- trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/text/default.t trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/numfield.t trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/textfield.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 2012-02-01 02:30:37 UTC (rev 4347) +++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/text/default.t 2012-02-01 03:07:59 UTC (rev 4348) @@ -1,4 +1,4 @@ -<!-- Copyright 2011 - see COPYING for details [LGPL] --> +<!-- Copyright 2012 - see COPYING for details [LGPL] --> <vexi xmlns:ui="vexi://ui" xmlns:meta="vexi://meta" xmlns="org.vexi.lib"> <meta:doc> @@ -10,7 +10,11 @@ // 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" /> + <ui:box> + <text.edit id="edit" /> + // spacer for cursor in case of right alignment + <ui:box width="2" /> + </ui:box> <role.repeatable id="cursor" display="false" fill="black" interval="300" width="1"> var counter = 0; // counter used to implement blinking @@ -67,7 +71,7 @@ } else { // place cursor at start of cBlock var d = $edit.distanceto(cBlock); - $cursor.x = d.x; + $cursor.x = d.x + (textalign=="right" ? cBlock.width : 0); $cursor.y = d.y; $cursor.height = vexi.ui.font.height(cBlock.font, cBlock.fontsize, "dy"); } Modified: trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/numfield.t =================================================================== --- trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/numfield.t 2012-02-01 02:30:37 UTC (rev 4347) +++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/numfield.t 2012-02-01 03:07:59 UTC (rev 4348) @@ -1,4 +1,4 @@ -<!-- Copyright 2011 - see COPYING for details [LGPL] --> +<!-- Copyright 2012 - see COPYING for details [LGPL] --> <vexi xmlns:ui="vexi://ui" xmlns:meta="vexi://meta" xmlns="vexi.theme" xmlns:lib="org.vexi.lib"> @@ -13,6 +13,7 @@ <ui:box id="content" /> <lib:layout.pad id="shadowpad" padding="3" vshrink="true"> <ui:box id="shadow" align="right" textcolor="#999999" /> + <ui:box width="2" /> // match text.default cursor spacer </lib:layout.pad> </ui:box> Modified: trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/textfield.t =================================================================== --- trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/textfield.t 2012-02-01 02:30:37 UTC (rev 4347) +++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/textfield.t 2012-02-01 03:07:59 UTC (rev 4348) @@ -1,4 +1,4 @@ -<!-- Copyright 2011 - see COPYING for details [LGPL] --> +<!-- Copyright 2012 - see COPYING for details [LGPL] --> <vexi xmlns:ui="vexi://ui" xmlns:meta="vexi://meta" xmlns="vexi.theme" xmlns:lib="org.vexi.lib"> @@ -13,6 +13,7 @@ <ui:box id="content" /> <lib:layout.pad id="shadowpad" padding="3" vshrink="true"> <ui:box id="shadow" align="left" textcolor="#999999" /> + <ui:box width="2" /> // match text.default cursor spacer </lib:layout.pad> </ui:box> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d _______________________________________________ Vexi-svn mailing list Vexi-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vexi-svn