Revision: 4484 http://vexi.svn.sourceforge.net/vexi/?rev=4484&view=rev Author: clrg Date: 2013-01-31 12:18:23 +0000 (Thu, 31 Jan 2013) Log Message: ----------- Fix enable/disable fill handling - no more v_prevfill - all handled in lib.finalize (which should move to lib.layout, maybe)
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/datefield.t trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/datetime.t trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/durationfield.t trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/lib/finalize.t trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/list.t trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/monthfield.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/option.t trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/spin.t trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/textarea.t trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/textfield.t trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/timefield.t trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/yearfield.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 2013-01-30 03:32:10 UTC (rev 4483) +++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/combo.t 2013-01-31 12:18:23 UTC (rev 4484) @@ -1,10 +1,8 @@ -<!-- Copyright 2011 - see COPYING for details [LGPL] --> +<!-- Copyright 2013 - see COPYING for details [LGPL] --> -<vexi xmlns:ui="vexi://ui" xmlns:meta="vexi://meta" xmlns="vexi.theme" - xmlns:lib="org.vexi.lib"> - <meta:doc> - <author>Charles Goodwin</author> - </meta:doc> +<vexi xmlns:ui="vexi://ui" + xmlns:lib="org.vexi.lib" + xmlns="vexi.theme"> <lib:widget.combo /> <lib:widget.shadowtext /> @@ -50,7 +48,6 @@ thisbox.v_edit = $edit.v_edit; thisbox.v_init = opt.optioninit; thisbox.v_popbox = $popbox; - thisbox.v_prevfill = .settings..fill; // pointer back to thisbox for static traps $content.p_option = thisbox; Modified: trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/datefield.t =================================================================== --- trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/datefield.t 2013-01-30 03:32:10 UTC (rev 4483) +++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/datefield.t 2013-01-31 12:18:23 UTC (rev 4484) @@ -48,11 +48,12 @@ thisbox.yearview = $year; thisbox.sep1 = $sep1; thisbox.sep2 = $sep2; + + thisbox.valuetype = "string"; + thisbox.th_bevel = thisbox; - thisbox.valuetype = "string"; thisbox.v_init = static.init; thisbox.v_popbox = $popbox; - thisbox.v_prevfill = .settings..fill; thisbox.v_textbox = false; //////// Modified: trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/datetime.t =================================================================== --- trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/datetime.t 2013-01-30 03:32:10 UTC (rev 4483) +++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/datetime.t 2013-01-31 12:18:23 UTC (rev 4484) @@ -4,8 +4,8 @@ xmlns="vexi.widget"> <ui:box margin="3" shrink="true"> - <datefield id="date" margin="0" /> - <timefield id="time" margin="0" /> + <datefield id="date" margin="0" fieldid="datefield" /> + <timefield id="time" margin="0" fieldid="timefield" /> thisbox.v_datefield = $date; thisbox.v_timefield = $time; @@ -35,6 +35,7 @@ $time.enabled = v; } + thisbox.fill ++= function() { return $date.fill; } thisbox.fill ++= function(v) { $date.fill = v; $time.fill = v; Modified: trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/durationfield.t =================================================================== --- trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/durationfield.t 2013-01-30 03:32:10 UTC (rev 4483) +++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/durationfield.t 2013-01-31 12:18:23 UTC (rev 4484) @@ -1,10 +1,8 @@ -<!-- Copyright 2011 - see COPYING for details [LGPL] --> +<!-- Copyright 2013 - see COPYING for details [LGPL] --> -<vexi xmlns:ui="vexi://ui" xmlns:meta="vexi://meta" xmlns="vexi.theme" - xmlns:lib="org.vexi.lib"> - <meta:doc> - <author>Charles Goodwin</author> - </meta:doc> +<vexi xmlns:ui="vexi://ui" + xmlns:lib="org.vexi.lib" + xmlns="vexi.theme"> <lib:widget.durationfield /> <lib:widget.shadowtext /> @@ -23,11 +21,10 @@ thisbox.th_view = $inset; thisbox.th_viewport = $content; thisbox.v_init = static.init; - thisbox.v_prevfill = .settings..fill; </bevel> <lib.finalize /> - static.init = { textalign:"right" } + static.init = { fill : .settings..fill, textalign:"right" } </vexi> Modified: trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/lib/finalize.t =================================================================== --- trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/lib/finalize.t 2013-01-30 03:32:10 UTC (rev 4483) +++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/lib/finalize.t 2013-01-31 12:18:23 UTC (rev 4484) @@ -6,34 +6,53 @@ This template adds some common finishing touches to several of the classic theme widgets. </meta:doc> + <ui:box> - v_container ++= static.containerWrite; + // v_ready because any visual properties have + // been initialized by this point in container + v_ready ++= static.readyWrite; </ui:box> /** set initial fill */ - static.containerWrite = function(v) { - cascade = v; - // set up fill effects - if (trapee.v_prevfill) { - trapee.v_fillbox.fill = trapee.v_prevfill; - trapee.enabled ++= static.enableWrite; + static.readyWrite = function(v) { + trapee.enabled ++= static.enableWrite; + trapee.fill ++= static.fillWrite; + // widgets initialize as enabled, however a preapply may + // set enabled to false; this deals with that scenario + if (!trapee.enabled) { + trapee.enabled = trapee.enabled; } // set up scroll redirects if (trapee.th_scroll) { rdt..addRedirect(trapee, trapee.th_scroll, "autohide", "scroll", "autohidehorizontal", "autohidevertical", "scrollhorizontal", "scrollvertical"); } + // now we are truly ready + cascade = v; } /** set visual enabled effect */ static.enableWrite = function(v) { - if (!v and trapee.enabled) { - trapee.v_prevfill = trapee.fill; + if (((v==true) == (trapee.enabled==true)) and trapee.v_ready) + return; + cascade = v; + if (trapee.enabled) { + trapee.fill = trapee.v_fillenabled; + } else { + trapee.v_fillenabled = trapee.fill; + trapee.v_filloverride = true; + trapee.fill = .settings..fill_disabled; + trapee.v_filloverride = false; } - cascade = v; - trapee.fill = trapee.enabled ? trapee.v_prevfill : .settings..fill_disabled; if (trapee.th_bevel) trapee.th_bevel.form = trapee.enabled ? "down" : "thindown"; } + /** set visual enabled effect */ + static.fillWrite = function(v) { + if (trapee.enabled or trapee.v_filloverride) + cascade = v; + else trapee.v_fillenabled = v; + } + </vexi> \ No newline at end of file Modified: trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/list.t =================================================================== --- trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/list.t 2013-01-30 03:32:10 UTC (rev 4483) +++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/list.t 2013-01-31 12:18:23 UTC (rev 4484) @@ -1,10 +1,8 @@ -<!-- Copyright 2011 - see COPYING for details [LGPL] --> +<!-- Copyright 2013 - see COPYING for details [LGPL] --> -<vexi xmlns:ui="vexi://ui" xmlns:meta="vexi://meta" xmlns="vexi.theme" - xmlns:lib="org.vexi.lib.widget"> - <meta:doc> - <author>Charles Goodwin</author> - </meta:doc> +<vexi xmlns:ui="vexi://ui" + xmlns:lib="org.vexi.lib" + xmlns="vexi.theme"> <lib:list /> <bevel redirect=":$content" form="down"> @@ -13,12 +11,11 @@ </scrollpane> thisbox.th_scroll = $scroll; - thisbox.v_init = static.listinit; - thisbox.v_prevfill = .settings..fill; + thisbox.v_init = static.init; </bevel> - <finalize /> + <lib.finalize /> - static.listinit = { orient:"vertical" }; + static.init = { fill : .settings..fill, orient:"vertical" }; </vexi> Modified: trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/monthfield.t =================================================================== --- trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/monthfield.t 2013-01-30 03:32:10 UTC (rev 4483) +++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/monthfield.t 2013-01-31 12:18:23 UTC (rev 4484) @@ -1,6 +1,6 @@ -<!-- Copyright 2011 - see COPYING for details [LGPL] --> +<!-- Copyright 2013 - see COPYING for details [LGPL] --> -<vexi xmlns:ui="vexi://ui" xmlns:meta="vexi://meta" +<vexi xmlns:ui="vexi://ui" xmlns:conf="vexi.conf" xmlns:lib="org.vexi.lib" xmlns:lay="vexi.layout" @@ -8,10 +8,6 @@ xmlns:classic="org.vexi.theme.classic" xmlns="vexi.theme"> - <meta:doc> - <author>Charles Goodwin</author> - </meta:doc> - <lib:role.popupable /> <lib:role.focusable /> <bevel blockPress="true" form="down" margin="3" shrink="true" type="yearfield"> @@ -48,7 +44,6 @@ thisbox.th_bevel = thisbox; thisbox.v_init = .datefield..init; thisbox.v_popbox = $popbox; - thisbox.v_prevfill = .settings..fill; thisbox.v_textbox = false; thisbox.value; ///> vexi.js.Date 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 2013-01-30 03:32:10 UTC (rev 4483) +++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/numfield.t 2013-01-31 12:18:23 UTC (rev 4484) @@ -1,10 +1,8 @@ -<!-- Copyright 2012 - see COPYING for details [LGPL] --> +<!-- Copyright 2013 - see COPYING for details [LGPL] --> -<vexi xmlns:ui="vexi://ui" xmlns:meta="vexi://meta" xmlns="vexi.theme" - xmlns:lib="org.vexi.lib"> - <meta:doc> - <author>Charles Goodwin</author> - </meta:doc> +<vexi xmlns:ui="vexi://ui" + xmlns:lib="org.vexi.lib" + xmlns="vexi.theme"> <lib:widget.numfield /> <lib:widget.shadowtext /> @@ -24,11 +22,10 @@ thisbox.th_view = $inset; thisbox.th_viewport = $content; thisbox.v_init = static.init; - thisbox.v_prevfill = .settings..fill; </bevel> <lib.finalize /> - static.init = { textalign:"right" } + static.init = { fill : .settings..fill, textalign:"right" } </vexi> 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 2013-01-30 03:32:10 UTC (rev 4483) +++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/option.t 2013-01-31 12:18:23 UTC (rev 4484) @@ -1,10 +1,8 @@ -<!-- Copyright 2011 - see COPYING for details [LGPL] --> +<!-- Copyright 2013 - see COPYING for details [LGPL] --> -<vexi xmlns:ui="vexi://ui" xmlns:meta="vexi://meta" xmlns="vexi.theme" - xmlns:lib="org.vexi.lib"> - <meta:doc> - <author>Charles Goodwin</author> - </meta:doc> +<vexi xmlns:ui="vexi://ui" + xmlns:lib="org.vexi.lib" + xmlns="vexi.theme"> <lib:widget.option redirect=":$content" margin="3" vshrink="true"> <bevel id="bevel" form="down"> @@ -37,7 +35,6 @@ thisbox.th_scroll = $scroll; thisbox.v_init = static.optioninit; thisbox.v_popbox = $popbox; - thisbox.v_prevfill = .settings..fill; // assign static functions thisbox.enabled ++= static.enableWrite; @@ -77,6 +74,8 @@ </lib:widget.option> <lib.finalize /> + static.optioninit = { align:"left", fill : .settings..fill, orient:"vertical" }; + static.surfaceWidthRead = function() { var marginleft = trapee.marginleft; var v_popbox = trapee.v_popbox; @@ -109,8 +108,6 @@ }; } - static.optioninit = { align:"left", orient:"vertical" }; - /** grow content scrollpane */ static.contentheightWrite = function(v) { cascade = v; Modified: trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/spin.t =================================================================== --- trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/spin.t 2013-01-30 03:32:10 UTC (rev 4483) +++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/spin.t 2013-01-31 12:18:23 UTC (rev 4484) @@ -1,10 +1,8 @@ -<!-- Copyright 2011 - see COPYING for details [LGPL] --> +<!-- Copyright 2013 - see COPYING for details [LGPL] --> -<vexi xmlns:ui="vexi://ui" xmlns:meta="vexi://meta" xmlns="vexi.theme" - xmlns:lib="org.vexi.lib.widget"> - <meta:doc> - <author>Charles Goodwin</author> - </meta:doc> +<vexi xmlns:ui="vexi://ui" + xmlns:lib="org.vexi.lib.widget" + xmlns="vexi.theme"> <lib:spin /> <ui:box redirect=":$content" margin="3" padding="3" vshrink="true"> @@ -30,7 +28,6 @@ thisbox.th_less = $less; thisbox.v_fillbox = $bevel; thisbox.v_init = static.init; - thisbox.v_prevfill = .settings..fill; thisbox.enabled ++= static.enableWrite; thisbox.maxvalue ++= static.constrainWidth; @@ -39,7 +36,7 @@ </ui:box> <lib.finalize /> - static.init = { textalign:"right" }; + static.init = { fill : .settings..fill, textalign:"right" }; static.enableWrite = function(v) { cascade = v; Modified: trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/textarea.t =================================================================== --- trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/textarea.t 2013-01-30 03:32:10 UTC (rev 4483) +++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/textarea.t 2013-01-31 12:18:23 UTC (rev 4484) @@ -1,11 +1,8 @@ -<!-- Copyright 2011 - see COPYING for details [LGPL] --> +<!-- Copyright 2013 - see COPYING for details [LGPL] --> -<vexi xmlns:ui="vexi://ui" xmlns:meta="vexi://meta" xmlns="vexi.theme" - xmlns:lib="org.vexi.lib.widget"> - <meta:doc> - <author>Charles Goodwin</author> - <notes>Win2k-like implementation of a text-area</notes> - </meta:doc> +<vexi xmlns:ui="vexi://ui" + xmlns:lib="org.vexi.lib.widget" + xmlns="vexi.theme"> <lib:textarea /> <bevel redirect=":$content" form="down" margin="3" padding="3"> @@ -13,10 +10,13 @@ <ui:box id="content" vshrink="true" /> </scrollpane> - thisbox.th_bevel = thisbox; + thisbox.th_bevel = thisbox; thisbox.th_scroll = $scroll; - thisbox.v_prevfill = .settings..fill; + thisbox.v_init = static.init; </bevel> <lib.finalize /> + + static.init = { fill : .settings..fill }; + </vexi> 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 2013-01-30 03:32:10 UTC (rev 4483) +++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/textfield.t 2013-01-31 12:18:23 UTC (rev 4484) @@ -22,8 +22,11 @@ thisbox.th_shadowwrap = $shadowpad; thisbox.th_viewport = $inset; thisbox.th_view = $content; - thisbox.v_prevfill = .settings..fill; + thisbox.v_init = static.init; </bevel> <lib.finalize /> + + static.init = { fill : .settings..fill }; + </vexi> Modified: trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/timefield.t =================================================================== --- trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/timefield.t 2013-01-30 03:32:10 UTC (rev 4483) +++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/timefield.t 2013-01-31 12:18:23 UTC (rev 4484) @@ -35,7 +35,6 @@ </ui:box> thisbox.v_init = static.init; - thisbox.v_prevfill = .settings..fill; thisbox.v_textbox = false; thisbox.use24hours = conf.settings..time_use24hours; Modified: trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/yearfield.t =================================================================== --- trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/yearfield.t 2013-01-30 03:32:10 UTC (rev 4483) +++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/yearfield.t 2013-01-31 12:18:23 UTC (rev 4484) @@ -1,6 +1,6 @@ -<!-- Copyright 2011 - see COPYING for details [LGPL] --> +<!-- Copyright 2013 - see COPYING for details [LGPL] --> -<vexi xmlns:ui="vexi://ui" xmlns:meta="vexi://meta" +<vexi xmlns:ui="vexi://ui" xmlns:conf="vexi.conf" xmlns:lib="org.vexi.lib" xmlns:lay="vexi.layout" @@ -8,10 +8,6 @@ xmlns:classic="org.vexi.theme.classic" xmlns="vexi.theme"> - <meta:doc> - <author>Charles Goodwin</author> - </meta:doc> - <lib:role.popupable /> <lib:role.focusable /> <bevel blockPress="true" form="down" margin="3" shrink="true" type="yearfield"> @@ -46,7 +42,6 @@ thisbox.th_bevel = thisbox; thisbox.v_init = .datefield..init; thisbox.v_popbox = $popbox; - thisbox.v_prevfill = .settings..fill; thisbox.v_textbox = false; thisbox.value; ///> vexi.js.Date This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_jan _______________________________________________ Vexi-svn mailing list Vexi-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vexi-svn