Revision: 3279 http://vexi.svn.sourceforge.net/vexi/?rev=3279&view=rev Author: clrg Date: 2008-12-14 00:48:41 +0000 (Sun, 14 Dec 2008)
Log Message: ----------- Preload theme images so they don't get dropped from memory Modified Paths: -------------- trunk/widgets/org.vexi.widgets/src/org/vexi/theme/classic/settings.t Added Paths: ----------- trunk/widgets/org.vexi.widgets/src/org/vexi/theme/classic/preload.t Added: trunk/widgets/org.vexi.widgets/src/org/vexi/theme/classic/preload.t =================================================================== --- trunk/widgets/org.vexi.widgets/src/org/vexi/theme/classic/preload.t (rev 0) +++ trunk/widgets/org.vexi.widgets/src/org/vexi/theme/classic/preload.t 2008-12-14 00:48:41 UTC (rev 3279) @@ -0,0 +1,24 @@ +<!-- Copyright 2008 - see COPYING for details [LGPL] --> + +<vexi xmlns:ui="vexi://ui" xmlns:meta="vexi://meta" xmlns="org.vexi.theme.classic"> + <meta:doc> + <author>Charles Goodwin</author> + </meta:doc> + + <ui:box> + + var loadImages = function(res) { + for (var k in res) { + if (k.charAt(0)=='.') continue; + var i = k.lastIndexOf('.png'); + if (i>0 and i==k.length-4) { + thisbox[0] = vexi.box; + thisbox[0].fill = res[k]; + } else callee(res[k]); + } + } + + loadImages(.image); + + </ui:box> +</vexi> Modified: trunk/widgets/org.vexi.widgets/src/org/vexi/theme/classic/settings.t =================================================================== --- trunk/widgets/org.vexi.widgets/src/org/vexi/theme/classic/settings.t 2008-12-14 00:45:04 UTC (rev 3278) +++ trunk/widgets/org.vexi.widgets/src/org/vexi/theme/classic/settings.t 2008-12-14 00:48:41 UTC (rev 3279) @@ -1,10 +1,10 @@ <!-- Copyright 2008 - see COPYING for details [LGPL] --> -<vexi xmlns:ui="vexi://ui" xmlns:meta="vexi://meta"> +<vexi xmlns:ui="vexi://ui" xmlns:meta="vexi://meta" xmlns="org.vexi.theme.classic"> <meta:doc> <author>Charles Goodwin</author> </meta:doc> - + <ui:box /> static.buttonfill = "#d4d0c8"; @@ -22,4 +22,7 @@ static.themename = "Classic"; static.themepath = "org.vexi.theme.classic"; + // preload images so they don't get dropped + static.imagecache = .preload(vexi.box); + </vexi> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ _______________________________________________ Vexi-svn mailing list Vexi-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vexi-svn