Revision: 4573 http://sourceforge.net/p/vexi/code/4573 Author: clrg Date: 2013-11-13 19:23:19 +0000 (Wed, 13 Nov 2013) Log Message: ----------- Overhaul of classic theme's handling of colours - much easier to pick new colours using settings - bevels mesh with most colours - bevel fills adjust to match form - added classic.lib.button as a small optimisation
Modified Paths: -------------- branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/bevel.t branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/button.t branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/combo.t branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/datefield.t branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/datepicker.t branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/divider.t branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/durationfield.t branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/image/tabtop/nn.png branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/image/tabtop/ss.png branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/image/tabtop/sw.png branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/image/tabtop/ww.png branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/monthfield.t branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/numfield.t branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/option.t branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/quarterfield.t branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/scrollbar.t branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/separator.t branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/tab.t branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/textarea.t branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/textfield.t branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/timefield.t branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/weekfield.t branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/yearfield.t branches/vexi3/org.vexi-vexi.widgets/src_poke/poke/widgets/datetime.t Added Paths: ----------- branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/lib/button.t branches/vexi3/org.vexi-vexi.widgets/src_poke/poke/vexi/widget/textfield.t Modified: branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/bevel.t =================================================================== --- branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/bevel.t 2013-11-13 11:22:53 UTC (rev 4572) +++ branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/bevel.t 2013-11-13 19:23:19 UTC (rev 4573) @@ -1,94 +1,128 @@ -<!-- 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:lay="org.vexi.lib.layout"> - <meta:doc> - <author>Charles Goodwin</author> - </meta:doc> +<vexi xmlns:ui="vexi://ui" + xmlns:lay="org.vexi.lib.layout" + xmlns="vexi.theme"> <ui:box redirect=":$content"> - <ui:box orient="vertical" hshrink="true"> - <ui:box id="outer_nw" height="1" /> - <ui:box id="outer_ww" width="1" /> - <ui:box id="outer_sw" height="1" /> - </ui:box> - <ui:box orient="vertical"> - <ui:box id="outer_nn" height="1" vshrink="true" /> - <ui:box> - <ui:box orient="vertical" hshrink="true"> - <ui:box id="inner_nw" height="1" /> - <ui:box id="inner_ww" width="1" /> - <ui:box id="inner_sw" height="1" /> + <ui:box id="outer"> + <ui:box orient="vertical" hshrink="true"> + <ui:box id="outer_nw" height="1" /> + <ui:box id="outer_ww" width="1" /> + <ui:box id="outer_sw" height="1" /> + </ui:box> + <ui:box orient="vertical"> + <ui:box id="outer_nn" height="1" vshrink="true" /> + <ui:box id="inner"> + <ui:box orient="vertical" hshrink="true"> + <ui:box id="inner_nw" height="1" /> + <ui:box id="inner_ww" width="1" /> + <ui:box id="inner_sw" height="1" /> + </ui:box> + <ui:box orient="vertical"> + <ui:box id="inner_nn" height="1" vshrink="true" /> + <ui:box id="content" /> + <ui:box id="inner_ss" height="1" vshrink="true" /> + </ui:box> + <ui:box orient="vertical" hshrink="true"> + <ui:box id="inner_ne" height="1" /> + <ui:box id="inner_ee" width="1" /> + <ui:box id="inner_se" height="1" /> + </ui:box> </ui:box> - <ui:box orient="vertical"> - <ui:box id="inner_nn" height="1" vshrink="true" /> - <ui:box id="content" /> - <ui:box id="inner_ss" height="1" vshrink="true" /> - </ui:box> - <ui:box orient="vertical" hshrink="true"> - <ui:box id="inner_ne" height="1" /> - <ui:box id="inner_ee" width="1" /> - <ui:box id="inner_se" height="1" /> - </ui:box> + <ui:box id="outer_ss" height="1" vshrink="true" /> </ui:box> - <ui:box id="outer_ss" height="1" vshrink="true" /> + <ui:box orient="vertical" hshrink="true"> + <ui:box id="outer_ne" height="1" /> + <ui:box id="outer_ee" width="1" /> + <ui:box id="outer_se" height="1" /> + </ui:box> </ui:box> - <ui:box orient="vertical" hshrink="true"> - <ui:box id="outer_ne" height="1" /> - <ui:box id="outer_ee" width="1" /> - <ui:box id="outer_se" height="1" /> - </ui:box> + // a general assignment useful for pre-applying bevels + // to widgets which also post-apply theme.lib.finalize + thisbox.th_bevel = thisbox; + + // important - it signals to lib.layout.container to + // not set any fill traps as we want to do that here + thisbox.v_fillbox = thisbox; + thisbox.v_content = $content; + var fillbox = $outer; + var fillval; + + thisbox.fill ++= function() { return fillbox.fill; } + thisbox.fill ++= function(v) { fillbox.fill = v; } + thisbox.form ++= function(v) { + if (form == v) return; cascade = v; + + // bevel colours var outer1, outer2, outer3, inner1, inner2, inner3; + // might want to adjust fill box + var nextfillbox; + if (v!=null) { switch(v) { case "thinup": outer1 = "#ffffff"; - outer2 = "#c0c0c0"; - outer3 = "#7b7d7b"; + outer2 = "#3fffffff";//"#c0c0c0"; + outer3 = "#69000000";//"#7b7d7b"; + nextfillbox = $inner; break; case "thindown": - outer1 = "#7b7d7b"; - outer2 = "#c0c0c0"; + outer1 = "#69000000";//"#7b7d7b"; + outer2 = "#3fffffff";//"#c0c0c0"; outer3 = "#ffffff"; + nextfillbox = $inner; break; case "up": outer1 = "#ffffff"; - outer2 = "#404040"; - outer3 = "#404040"; - inner1 = "#c0c0c0"; - inner2 = "#808080"; - inner3 = "#808080"; + outer2 = "#a6000000";//"#404040"; + outer3 = "#a6000000";//"#404040"; + inner1 = "#3fffffff";//"#c0c0c0"; + inner2 = "#5a000000";//"#808080"; + inner3 = "#5a000000";//"#808080"; + nextfillbox = $outer; break; case "down": - outer1 = "#404040"; + outer1 = "#a6000000";//"#404040"; outer2 = "#ffffff"; outer3 = "#ffffff"; - inner1 = "#808080"; - inner2 = "#c0c0c0"; - inner3 = "#c0c0c0"; + inner1 = "#5a000000";//"#808080"; + inner2 = "#3fffffff";//"#c0c0c0"; + inner3 = "#3fffffff";//"#c0c0c0"; + nextfillbox = $content; break; case "flat": - outer1 = "#808080"; + outer1 = "#5a000000";//"#808080"; outer3 = "#ffffff"; inner1 = "#ffffff"; - inner2 = "#808080"; - inner3 = "#808080"; + inner2 = "#5a000000";//"#808080"; + inner3 = "#5a000000";//"#808080"; + nextfillbox = $inner; break; case "above": - outer1 = "#c0c0c0"; - outer2 = "#404040"; - outer3 = "#404040"; + outer1 = "#3fffffff";//"#c0c0c0"; + outer2 = "#a6000000";//"#404040"; + outer3 = "#a6000000";//"#404040"; inner1 = "#ffffff"; - inner2 = "#808080"; - inner3 = "#808080"; + inner2 = "#5a000000";//"#808080"; + inner3 = "#5a000000";//"#808080"; + nextfillbox = $inner; break; } } + + // re-fill + if (nextfillbox != fillbox) { + nextfillbox.fill = fillbox.fill; + fillbox.fill = null; + fillbox = nextfillbox; + } + $outer_nn.fill = outer1; $outer_nw.fill = outer1; $outer_ww.fill = outer1; Modified: branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/button.t =================================================================== --- branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/button.t 2013-11-13 11:22:53 UTC (rev 4572) +++ branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/button.t 2013-11-13 19:23:19 UTC (rev 4573) @@ -5,11 +5,12 @@ <lib:button /> <bevel redirect=":$content" margin="3" padding="5 10" shrink="true"> - <lib.focusborder id="focus" fill=":.settings..buttonfill"> + <lib.focusborder id="focus"> <ui:box id="content" /> </lib.focusborder> thisbox.th_focus = $focus; + thisbox.v_init = static.init; active ++= static.activeWrite; hover ++= static.normalWrite; @@ -19,9 +20,7 @@ </bevel> - static.enableWrite = function(v) { - cascade = v; - } + static.init = { fill: .settings..buttonfill }; static.activeWrite = function(v) { cascade = v; trapee.form = "down"; } static.normalWrite = function(v) { cascade = v; Modified: branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/combo.t =================================================================== --- branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/combo.t 2013-11-13 11:22:53 UTC (rev 4572) +++ branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/combo.t 2013-11-13 19:23:19 UTC (rev 4573) @@ -18,11 +18,11 @@ </lib:layout.pad> </lib.focusborder> <ui:box id="rightholder" hshrink="true"> - <button id="button" width="18" minheight="18" shrink="false"> + <lib.button id="button" width="18" minheight="18" shrink="false"> <ui:box layout="layer"> <ui:box id="arrow" fill=":.image.arrowdown" shrink="true" /> </ui:box> - </button> + </lib.button> </ui:box> </bevel> <lib:layout.border id="popbox" border="black" fill="white" depth="1"> Modified: branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/datefield.t =================================================================== --- branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/datefield.t 2013-11-13 11:22:53 UTC (rev 4572) +++ branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/datefield.t 2013-11-13 19:23:19 UTC (rev 4573) @@ -2,18 +2,19 @@ <vexi xmlns:ui="vexi://ui" xmlns:conf="vexi.conf" - xmlns:lib="org.vexi.lib" + xmlns:role="org.vexi.lib.role" + xmlns:text="org.vexi.lib.text" + xmlns:lib="org.vexi.theme.classic.lib" xmlns:lay="vexi.layout" xmlns:util="vexi.util" - xmlns:classic="org.vexi.theme.classic" xmlns="vexi.theme"> - <lib:role.popupable /> - <lib:role.focusable /> + <role:popupable /> + <role:focusable /> <util:date /> <bevel blockPress="true" form="down" margin="3" shrink="true" type="yearfield"> <ui:box id="button" layout="layer" hshrink="true"> - <classic:button id="select" cursor="hand" focusable="false" margin="0" shrink="false" /> + <lib:button id="select" cursor="hand" focusable="false" margin="0" shrink="false" /> <lay:pad padding="1 2 2 2"><ui:box shrink="true" fill=":.image.datepicker" /></lay:pad> </ui:box> <lay:pad orient="vertical" padding="3" shrink="true"> @@ -25,16 +26,16 @@ <util:digit id="year" fieldsize="4" period="year" /> </ui:box> <ui:box id="editview" display="false"> - <lib:text.default id="edit" textalign="left" /> + <text:default id="edit" textalign="left" /> </ui:box> </lay:pad> <ui:box id="moreless" orient="vertical" width="15"> - <classic:button id="more" focusable="false" minheight="9" repeats="true" shrink="false"> + <lib:button id="more" focusable="false" minheight="9" repeats="true" shrink="false"> <lay:pad padding="0 3"><ui:box fill=":.image.arrowup_small" shrink="true" /></lay:pad> - </classic:button> - <classic:button id="less" focusable="false" minheight="9" repeats="true" shrink="false"> + </lib:button> + <lib:button id="less" focusable="false" minheight="9" repeats="true" shrink="false"> <lay:pad padding="0 3"><ui:box fill=":.image.arrowdown_small" shrink="true" /></lay:pad> - </classic:button> + </lib:button> </ui:box> <lay:border id="popbox" orient="vertical" border="black" depth="1" fill="white"> <!--datepicker id="datepicker" minwidth="200" minheight="160" shrink="true" /--> @@ -51,7 +52,6 @@ thisbox.valuetype = "string"; - thisbox.th_bevel = thisbox; thisbox.v_init = static.init; thisbox.v_popbox = $popbox; thisbox.v_textbox = false; @@ -234,7 +234,7 @@ selected = $day; </bevel> - <classic:lib.finalize /> + <lib.finalize /> static.init = { fill : .settings..fill }; Modified: branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/datepicker.t =================================================================== --- branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/datepicker.t 2013-11-13 11:22:53 UTC (rev 4572) +++ branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/datepicker.t 2013-11-13 19:23:19 UTC (rev 4573) @@ -1,31 +1,32 @@ -<!-- 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:lay="vexi.layout" xmlns:role="org.vexi.lib.role" xmlns:util="vexi.util"> - <meta:doc> - <author>Charles Goodwin</author> - </meta:doc> +<vexi xmlns:ui="vexi://ui" + xmlns:lay="vexi.layout" + xmlns:role="org.vexi.lib.role" + xmlns:util="vexi.util" + xmlns:image="org.vexi.theme.classic.image" + xmlns="org.vexi.theme.classic.lib"> <role:focusable /> <util:date /> <ui:box orient="vertical"> <ui:box fill="white" vshrink="true"> <button id="decmonth" focusable="false" hshrink="true"> - <lay:pad padding="4 2"><ui:box fill=":.image.arrowleft" /></lay:pad> + <lay:pad padding="4 2"><ui:box fill=":image.arrowleft" /></lay:pad> </button> <ui:box id="month" /> <button id="incmonth" focusable="false" hshrink="true"> - <lay:pad padding="4 2"><ui:box fill=":.image.arrowright" /></lay:pad> + <lay:pad padding="4 2"><ui:box fill=":image.arrowright" /></lay:pad> </button> <button id="decyear" focusable="false" hshrink="true"> - <lay:pad padding="4 2"><ui:box fill=":.image.arrowleft" /></lay:pad> + <lay:pad padding="4 2"><ui:box fill=":image.arrowleft" /></lay:pad> </button> <ui:box id="year" /> <button id="incyear" focusable="false" hshrink="true"> - <lay:pad padding="4 2"><ui:box fill=":.image.arrowright" /></lay:pad> + <lay:pad padding="4 2"><ui:box fill=":image.arrowright" /></lay:pad> </button> <button id="close" focusable="false" hshrink="true"> - <lay:pad padding="4 2"><ui:box fill=":.image.close" /></lay:pad> + <lay:pad padding="4 2"><ui:box fill=":image.close" /></lay:pad> </button> </ui:box> <ui:box fill="black" height="1" vshrink="true" /> Modified: branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/divider.t =================================================================== --- branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/divider.t 2013-11-13 11:22:53 UTC (rev 4572) +++ branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/divider.t 2013-11-13 19:23:19 UTC (rev 4573) @@ -17,8 +17,8 @@ </lib:divider> - static.activeWrite = function(v) { cascade = v; trapee.fill = v ? "#e4e0d8" : null; } - static.enterWrite = function(v) { cascade = v; trapee.fill = "#e4e0d8"; } + static.activeWrite = function(v) { cascade = v; trapee.fill = v ? "#6fff" : null; } + static.enterWrite = function(v) { cascade = v; trapee.fill = "#6fff"; } static.leaveWrite = function(v) { cascade = v; if (!trapee.active) trapee.fill = null; } </vexi> Modified: branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/durationfield.t =================================================================== --- branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/durationfield.t 2013-11-13 11:22:53 UTC (rev 4572) +++ branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/durationfield.t 2013-11-13 19:23:19 UTC (rev 4573) @@ -14,7 +14,6 @@ </lib:layout.pad> </ui:box> - thisbox.th_bevel = thisbox; thisbox.th_shadowtext = $shadow; thisbox.th_shadowwrap = $shadowpad; thisbox.th_minus = $minus; Modified: branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/image/tabtop/nn.png =================================================================== (Binary files differ) Modified: branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/image/tabtop/ss.png =================================================================== (Binary files differ) Modified: branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/image/tabtop/sw.png =================================================================== (Binary files differ) Modified: branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/image/tabtop/ww.png =================================================================== (Binary files differ) Added: branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/lib/button.t =================================================================== --- branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/lib/button.t (rev 0) +++ branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/lib/button.t 2013-11-13 19:23:19 UTC (rev 4573) @@ -0,0 +1,21 @@ +<!-- Copyright 2013 - see COPYING for details [LGPL] --> + +<vexi xmlns="org.vexi.theme.classic" + xmlns:lay="org.vexi.lib.layout" + xmlns:role="org.vexi.lib.role"> + + // a no-frills button i.e. no focus, margin, padding etc + + <role:clickable /> + <bevel> + + var button_static = .button[""]; + active ++= button_static.activeWrite; + hover ++= button_static.normalWrite; + hover ++= button_static.normalWrite; + normal ++= button_static.normalWrite; + v_init = button_static.init; + + </bevel> + <lay:container /> +</vexi> Modified: branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/monthfield.t =================================================================== --- branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/monthfield.t 2013-11-13 11:22:53 UTC (rev 4572) +++ branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/monthfield.t 2013-11-13 19:23:19 UTC (rev 4573) @@ -2,17 +2,18 @@ <vexi xmlns:ui="vexi://ui" xmlns:conf="vexi.conf" - xmlns:lib="org.vexi.lib" + xmlns:role="org.vexi.lib.role" + xmlns:text="org.vexi.lib.text" + xmlns:lib="org.vexi.theme.classic.lib" xmlns:lay="vexi.layout" xmlns:util="vexi.util" - xmlns:classic="org.vexi.theme.classic" xmlns="vexi.theme"> - <lib:role.popupable /> - <lib:role.focusable /> + <role:popupable /> + <role:focusable /> <bevel blockPress="true" form="down" margin="3" shrink="true" type="yearfield"> <ui:box id="button" layout="layer" hshrink="true"> - <classic:button id="select" cursor="hand" focusable="false" margin="0" shrink="false" /> + <lib:button id="select" cursor="hand" focusable="false" margin="0" shrink="false" /> <lay:pad padding="1 2 2 2"><ui:box shrink="true" fill=":.image.datepicker" /></lay:pad> </ui:box> <lay:pad orient="vertical" padding="3" shrink="true"> @@ -22,16 +23,16 @@ <util:digit id="year" period="year" fieldsize="4" /> </ui:box> <ui:box id="editview" display="false"> - <lib:text.default id="edit" textalign="left" /> + <text:default id="edit" textalign="left" /> </ui:box> </lay:pad> <ui:box id="moreless" orient="vertical" width="15"> - <classic:button id="more" focusable="false" minheight="9" repeats="true" shrink="false"> + <lib:button id="more" focusable="false" minheight="9" repeats="true" shrink="false"> <lay:pad padding="0 3"><ui:box fill=":.image.arrowup_small" shrink="true" /></lay:pad> - </classic:button> - <classic:button id="less" focusable="false" minheight="9" repeats="true" shrink="false"> + </lib:button> + <lib:button id="less" focusable="false" minheight="9" repeats="true" shrink="false"> <lay:pad padding="0 3"><ui:box fill=":.image.arrowdown_small" shrink="true" /></lay:pad> - </classic:button> + </lib:button> </ui:box> <lay:border id="popbox" orient="vertical" border="black" depth="1" fill="white"> <!--datepicker id="datepicker" minwidth="200" minheight="160" shrink="true" /--> @@ -41,7 +42,6 @@ thisbox.datepicker = $datepicker; thisbox.dateview = $dateview; thisbox.sep = $sep; - thisbox.th_bevel = thisbox; thisbox.v_init = .datefield..init; thisbox.v_popbox = $popbox; thisbox.v_textbox = false; @@ -169,6 +169,7 @@ return; } if (v.length>1) { + if(selected==null) return; // timeview still on display var si = dateview.indexof(selected); switch(v) { @@ -217,7 +218,7 @@ thisbox.selected = $month; </bevel> - <classic:lib.finalize /> + <lib:finalize /> var initDatePicker = function(datefield, datepicker_box) { // apply datepicker to box Modified: branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/numfield.t =================================================================== --- branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/numfield.t 2013-11-13 11:22:53 UTC (rev 4572) +++ branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/numfield.t 2013-11-13 19:23:19 UTC (rev 4573) @@ -15,7 +15,6 @@ </lib:layout.pad> </ui:box> - thisbox.th_bevel = thisbox; thisbox.th_shadowtext = $shadow; thisbox.th_shadowwrap = $shadowpad; thisbox.th_minus = $minus; Modified: branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/option.t =================================================================== --- branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/option.t 2013-11-13 11:22:53 UTC (rev 4572) +++ branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/option.t 2013-11-13 19:23:19 UTC (rev 4573) @@ -13,11 +13,11 @@ </lib:layout.pad> </lib.focusborder> <ui:box id="rightholder" hshrink="true"> - <button id="button" width="18" minheight="18" hshrink="true" vshrink="false"> + <lib.button id="button" width="18" minheight="18" hshrink="true" vshrink="false"> <ui:box layout="layer"> <ui:box id="arrow" fill=":.image.arrowdown" shrink="true" /> </ui:box> - </button> + </lib.button> </ui:box> </bevel> <lib:layout.border id="popbox" border="black" fill="white" depth="1"> Modified: branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/quarterfield.t =================================================================== --- branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/quarterfield.t 2013-11-13 11:22:53 UTC (rev 4572) +++ branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/quarterfield.t 2013-11-13 19:23:19 UTC (rev 4573) @@ -1,40 +1,38 @@ -<!-- 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:conf="vexi.conf" - xmlns:lib="org.vexi.lib" - xmlns:lay="vexi.layout" - xmlns:util="vexi.util" - xmlns:classic="org.vexi.theme.classic" > +<vexi xmlns:ui="vexi://ui" + xmlns:conf="vexi.conf" + xmlns:role="org.vexi.lib.role" + xmlns:text="org.vexi.lib.text" + xmlns:lib="org.vexi.theme.classic.lib" + xmlns:lay="vexi.layout" + xmlns:util="vexi.util" + 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"> - <ui:box layout="layer" hshrink="true"> - <classic:button id="select" cursor="hand" fill="#d4d0c8" focusable="false" margin="0" shrink="false" /> + <role:popupable /> + <role:focusable /> + <bevel blockPress="true" form="down" margin="3" shrink="true" type="yearfield"> + <ui:box id="button" layout="layer" hshrink="true"> + <lib:button id="select" cursor="hand" focusable="false" margin="0" shrink="false" /> <lay:pad padding="1 2 2 2"><ui:box shrink="true" fill=":.image.datepicker" /></lay:pad> </ui:box> - <lay:pad id="bg" fill="white" orient="vertical" padding="3" shrink="true"> + <lay:pad orient="vertical" padding="3" shrink="true"> <ui:box id="dateview"> <util:digit id="year" period="year" fieldsize="4" /> <util:digit id="sep" fieldsize="1" text="q" /> <util:digit id="quarter" period="quarter"/> </ui:box> <ui:box id="editview" display="false"> - <lib:text.default id="edit" textalign="left" /> + <text:default id="edit" textalign="left" /> </ui:box> </lay:pad> - <ui:box orient="vertical" width="15"> - <classic:button id="more" focusable="false" minheight="9" repeats="true" shrink="false"> + <ui:box id="moreless" orient="vertical" width="15"> + <lib:button id="more" focusable="false" minheight="9" repeats="true" shrink="false"> <lay:pad padding="0 3"><ui:box fill=":.image.arrowup_small" shrink="true" /></lay:pad> - </classic:button> - <classic:button id="less" focusable="false" minheight="9" repeats="true" shrink="false"> + </lib:button> + <lib:button id="less" focusable="false" minheight="9" repeats="true" shrink="false"> <lay:pad padding="0 3"><ui:box fill=":.image.arrowdown_small" shrink="true" /></lay:pad> - </classic:button> + </lib:button> </ui:box> <lay:border id="popbox" orient="vertical" border="black" depth="1" fill="white"> <!--datepicker id="datepicker" minwidth="200" minheight="160" shrink="true" /--> @@ -44,11 +42,14 @@ thisbox.datepicker = $datepicker; thisbox.dateview = $dateview; thisbox.sep = $sep; + thisbox.v_init = .datefield..init; thisbox.v_popbox = $popbox; thisbox.v_textbox = false; + thisbox.text ++= .datefield..textRead; + thisbox.text ++= .datefield..textWrite; + thisbox.value; ///> vexi.js.Date - thisbox.value ++= function(v) { cascade = v; @@ -60,7 +61,7 @@ } //////// - // button actionsmhhht + // button actions thisbox.focused ++= .timefield..focusWrite; thisbox.selected ++= .timefield..selectWrite; @@ -111,12 +112,12 @@ thisbox.enabled ++= function(v) { cascade = v; + var max = vexi.ui.maxdim; + $button.maxheight = v ? max : 0; $select.enabled = v; + $moreless.maxheight = v ? max : 0; $more.enabled = v; $less.enabled = v; - $more.maxwidth = v ? vexi.ui.maxdim : 0; - $less.maxwidth = v ? vexi.ui.maxdim : 0; - $bg.fill = v ? "white" : "#d4d0c8"; } thisbox.focused ++= function(v) { @@ -168,6 +169,7 @@ return; } if (v.length>1) { + if(selected==null) return; // timeview still on display var si = dateview.indexof(selected); switch(v) { @@ -216,6 +218,7 @@ thisbox.selected = $quarter; </bevel> + <lib:finalize /> var initDatePicker = function(datefield, datepicker_box) { // apply datepicker to box @@ -236,7 +239,6 @@ /** popdown when datepicker requests it */ datepicker_box.popdown ++= function(v) { datefield.popdown = true; return; } } - static.popupWrite = function(v) { initDatePicker(trapee, trapee.datepicker); Modified: branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/scrollbar.t =================================================================== --- branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/scrollbar.t 2013-11-13 11:22:53 UTC (rev 4572) +++ branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/scrollbar.t 2013-11-13 19:23:19 UTC (rev 4573) @@ -8,18 +8,18 @@ <lib:scrollbar /> <ui:box minthumbsize="8"> - <button id="back" width="16" height="16" repeats="true" shrink="true"> + <lib.button id="back" width="16" height="16" repeats="true" shrink="true"> <ui:box layout="place"><ui:box id="backimg" debug="true" shrink="true" /></ui:box> - </button> + </lib.button> <role:clickable id="track" align="topleft" enabled="true" fill=":.image.scrollbg" layout="place" repeats="true"> <ui:box id="shadow" fill="#c4c0b8" display="false" /> <role:draggable id="thumb"> <bevel fill=":.settings..widgetfill" form="up" /> </role:draggable> </role:clickable> - <button id="next" width="16" height="16" repeats="true" shrink="true"> + <lib.button id="next" width="16" height="16" repeats="true" shrink="true"> <ui:box layout="place"><ui:box id="nextimg" debug="true" shrink="true" /></ui:box> - </button> + </lib.button> thisbox.th_back = $back; thisbox.th_next = $next; Modified: branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/separator.t =================================================================== --- branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/separator.t 2013-11-13 11:22:53 UTC (rev 4572) +++ branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/separator.t 2013-11-13 19:23:19 UTC (rev 4573) @@ -1,4 +1,4 @@ -<!-- Copyright 2011 - see COPYING for details [LGPL] --> +<!-- Copyright 2013 - see COPYING for details [LGPL] --> <vexi xmlns:ui="vexi://ui" xmlns:meta="vexi://meta" xmlns="org.vexi.lib.widget"> <meta:doc> @@ -7,21 +7,21 @@ <separator redirect="null" margin="3"> <ui:box orient="vertical" hshrink="true" minwidth="1"> - <ui:box fill="#7b7d7b" vshrink="true" minheight="1" /> - <ui:box fill="#7b7d7b" /> - <ui:box fill="#c0c0c0" vshrink="true" minheight="1" /> + <ui:box fill="#69000000" vshrink="true" minheight="1" /> + <ui:box fill="#69000000" /> + <ui:box fill="#3fffffff" vshrink="true" minheight="1" /> </ui:box> // central column <ui:box orient="vertical"> - <ui:box fill="#7b7d7b" vshrink="true" minheight="1" /> + <ui:box fill="#69000000" vshrink="true" minheight="1" /> <ui:box /> <ui:box fill="#ffffff" vshrink="true" minheight="1" /> </ui:box> // right column <ui:box orient="vertical" hshrink="true" minwidth="1"> - <ui:box fill="#c0c0c0" vshrink="true" minheight="1" /> + <ui:box fill="#3fffffff" vshrink="true" minheight="1" /> <ui:box fill="#ffffff" /> <ui:box fill="#ffffff" vshrink="true" minheight="1" /> </ui:box> Modified: branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/tab.t =================================================================== --- branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/tab.t 2013-11-13 11:22:53 UTC (rev 4572) +++ branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/tab.t 2013-11-13 19:23:19 UTC (rev 4573) @@ -1,4 +1,4 @@ -<!-- 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" xmlns:lay="org.vexi.lib.layout"> @@ -23,7 +23,7 @@ </lay:pad> </lay:border> <ui:box height="2"> - <ui:box width="2" /> + <ui:box width="1" /> <ui:box id="overfill" height="2" fill=":.settings..tabfill" /> <ui:box width="2" /> </ui:box> Modified: branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/textarea.t =================================================================== --- branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/textarea.t 2013-11-13 11:22:53 UTC (rev 4572) +++ branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/textarea.t 2013-11-13 19:23:19 UTC (rev 4573) @@ -10,7 +10,6 @@ <ui:box id="content" vshrink="true" /> </scrollpane> - thisbox.th_bevel = thisbox; thisbox.th_scroll = $scroll; thisbox.v_init = static.init; Modified: branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/textfield.t =================================================================== --- branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/textfield.t 2013-11-13 11:22:53 UTC (rev 4572) +++ branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/textfield.t 2013-11-13 19:23:19 UTC (rev 4573) @@ -17,7 +17,6 @@ </lib:layout.pad> </ui:box> - thisbox.th_bevel = thisbox; thisbox.th_shadowtext = $shadow; thisbox.th_shadowwrap = $shadowpad; thisbox.th_viewport = $inset; Modified: branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/timefield.t =================================================================== --- branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/timefield.t 2013-11-13 11:22:53 UTC (rev 4572) +++ branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/timefield.t 2013-11-13 19:23:19 UTC (rev 4573) @@ -1,12 +1,12 @@ <!-- Copyright 2013 - see COPYING for details [LGPL] --> <vexi xmlns:ui="vexi://ui" - xmlns:lay="vexi.layout" xmlns:conf="vexi.conf" - xmlns:util="vexi.util" xmlns:role="org.vexi.lib.role" xmlns:text="org.vexi.lib.text" - xmlns:classic="org.vexi.theme.classic" + xmlns:lib="org.vexi.theme.classic.lib" + xmlns:lay="vexi.layout" + xmlns:util="vexi.util" xmlns="vexi.theme"> <role:focusable /> @@ -26,12 +26,12 @@ </ui:box> </lay:pad> <ui:box id="buttons" orient="vertical" width="15"> - <button id="more" focusable="false" minheight="9" repeats="true" shrink="false"> + <lib:button id="more" focusable="false" minheight="9" repeats="true" shrink="false"> <lay:pad padding="0 3"><ui:box fill=":.image.arrowup_small" shrink="true" /></lay:pad> - </button> - <button id="less" focusable="false" minheight="9" repeats="true" shrink="false"> + </lib:button> + <lib:button id="less" focusable="false" minheight="9" repeats="true" shrink="false"> <lay:pad padding="0 3"><ui:box fill=":.image.arrowdown_small" shrink="true" /></lay:pad> - </button> + </lib:button> </ui:box> thisbox.v_init = static.init; @@ -85,7 +85,6 @@ $more.enabled = v; $less.enabled = v; $buttons.maxheight = v ? vexi.ui.maxdim : 0; - form = v ? "down" : "thindown"; } //////// @@ -270,7 +269,7 @@ } </bevel> - <classic:lib.finalize /> + <lib:finalize /> static.init = { fill : .settings..fill }; Modified: branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/weekfield.t =================================================================== --- branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/weekfield.t 2013-11-13 11:22:53 UTC (rev 4572) +++ branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/weekfield.t 2013-11-13 19:23:19 UTC (rev 4573) @@ -2,17 +2,18 @@ <vexi xmlns:ui="vexi://ui" xmlns:conf="vexi.conf" - xmlns:lib="org.vexi.lib" + xmlns:role="org.vexi.lib.role" + xmlns:text="org.vexi.lib.text" + xmlns:lib="org.vexi.theme.classic.lib" xmlns:lay="vexi.layout" xmlns:util="vexi.util" - xmlns:classic="org.vexi.theme.classic" xmlns="vexi.theme"> - <lib:role.popupable /> - <lib:role.focusable /> + <role:popupable /> + <role:focusable /> <bevel blockPress="true" form="down" margin="3" shrink="true" type="yearfield"> <ui:box id="button" layout="layer" hshrink="true"> - <classic:button id="select" cursor="hand" focusable="false" margin="0" shrink="false" /> + <lib:button id="select" cursor="hand" focusable="false" margin="0" shrink="false" /> <lay:pad padding="1 2 2 2"><ui:box shrink="true" fill=":.image.datepicker" /></lay:pad> </ui:box> <lay:pad orient="vertical" padding="3" shrink="true"> @@ -22,26 +23,26 @@ <util:digit id="week" period="week"/> </ui:box> <ui:box id="editview" display="false"> - <lib:text.default id="edit" textalign="left" /> + <text:default id="edit" textalign="left" /> </ui:box> </lay:pad> <ui:box id="moreless" orient="vertical" width="15"> - <classic:button id="more" focusable="false" minheight="9" repeats="true" shrink="false"> + <lib:button id="more" focusable="false" minheight="9" repeats="true" shrink="false"> <lay:pad padding="0 3"><ui:box fill=":.image.arrowup_small" shrink="true" /></lay:pad> - </classic:button> - <classic:button id="less" focusable="false" minheight="9" repeats="true" shrink="false"> + </lib:button> + <lib:button id="less" focusable="false" minheight="9" repeats="true" shrink="false"> <lay:pad padding="0 3"><ui:box fill=":.image.arrowdown_small" shrink="true" /></lay:pad> - </classic:button> + </lib:button> </ui:box> <lay:border id="popbox" orient="vertical" border="black" depth="1" fill="white"> <!--datepicker id="datepicker" minwidth="200" minheight="160" shrink="true" /--> <ui:box id="datepicker" /> </lay:border> + const Date = vexi.js.Date; thisbox.datepicker = $datepicker; thisbox.dateview = $dateview; thisbox.sep = $sep; - thisbox.th_bevel = thisbox; thisbox.v_init = .datefield..init; thisbox.v_popbox = $popbox; thisbox.v_textbox = false; @@ -224,7 +225,7 @@ thisbox.selected = $year; </bevel> - <classic:lib.finalize /> + <lib:finalize /> var initDatePicker = function(datefield, datepicker_box) { // apply datepicker to box Modified: branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/yearfield.t =================================================================== --- branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/yearfield.t 2013-11-13 11:22:53 UTC (rev 4572) +++ branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/yearfield.t 2013-11-13 19:23:19 UTC (rev 4573) @@ -1,18 +1,19 @@ <!-- Copyright 2013 - see COPYING for details [LGPL] --> <vexi xmlns:ui="vexi://ui" - xmlns:conf="vexi.conf" - xmlns:lib="org.vexi.lib" - xmlns:lay="vexi.layout" - xmlns:util="vexi.util" - xmlns:classic="org.vexi.theme.classic" - xmlns="vexi.theme"> + xmlns:conf="vexi.conf" + xmlns:role="org.vexi.lib.role" + xmlns:text="org.vexi.lib.text" + xmlns:lib="org.vexi.theme.classic.lib" + xmlns:lay="vexi.layout" + xmlns:util="vexi.util" + xmlns="vexi.theme"> - <lib:role.popupable /> - <lib:role.focusable /> + <role:popupable /> + <role:focusable /> <bevel blockPress="true" form="down" margin="3" shrink="true" type="yearfield"> <ui:box id="button" layout="layer" hshrink="true"> - <classic:button id="select" cursor="hand" focusable="false" margin="0" shrink="false" /> + <lib:button id="select" cursor="hand" focusable="false" margin="0" shrink="false" /> <lay:pad padding="1 2 2 2"><ui:box shrink="true" fill=":.image.datepicker" /></lay:pad> </ui:box> <lay:pad orient="vertical" padding="3" shrink="true"> @@ -20,16 +21,16 @@ <util:digit id="year" period="year" fieldsize="4" /> </ui:box> <ui:box id="editview" display="false"> - <lib:text.default id="edit" textalign="left" /> + <text:default id="edit" textalign="left" /> </ui:box> </lay:pad> <ui:box id="moreless" orient="vertical" width="15"> - <classic:button id="more" focusable="false" minheight="9" repeats="true" shrink="false"> + <lib:button id="more" focusable="false" minheight="9" repeats="true" shrink="false"> <lay:pad padding="0 3"><ui:box fill=":.image.arrowup_small" shrink="true" /></lay:pad> - </classic:button> - <classic:button id="less" focusable="false" minheight="9" repeats="true" shrink="false"> + </lib:button> + <lib:button id="less" focusable="false" minheight="9" repeats="true" shrink="false"> <lay:pad padding="0 3"><ui:box fill=":.image.arrowdown_small" shrink="true" /></lay:pad> - </classic:button> + </lib:button> </ui:box> <lay:border id="popbox" orient="vertical" border="black" depth="1" fill="white"> <!--datepicker id="datepicker" minwidth="200" minheight="160" shrink="true" /--> @@ -39,7 +40,6 @@ thisbox.datepicker = $datepicker; thisbox.dateview = $dateview; thisbox.sep = $sep; - thisbox.th_bevel = thisbox; thisbox.v_init = .datefield..init; thisbox.v_popbox = $popbox; thisbox.v_textbox = false; @@ -213,7 +213,7 @@ thisbox.selected = $year; </bevel> - <classic:lib.finalize /> + <lib:finalize /> var initDatePicker = function(datefield, datepicker_box) { // apply datepicker to box Added: branches/vexi3/org.vexi-vexi.widgets/src_poke/poke/vexi/widget/textfield.t =================================================================== --- branches/vexi3/org.vexi-vexi.widgets/src_poke/poke/vexi/widget/textfield.t (rev 0) +++ branches/vexi3/org.vexi-vexi.widgets/src_poke/poke/vexi/widget/textfield.t 2013-11-13 19:23:19 UTC (rev 4573) @@ -0,0 +1,20 @@ +<!-- public domain --> + +<vexi xmlns:ui="vexi://ui" xmlns:w="vexi.widget" xmlns:poke="poke"> + <w:surface /> + <ui:box fill="white" orient="vertical"> + <ui:box> + <ui:Box /> + <w:textfield id="field" fill="yellow" /> + <ui:Box /> + </ui:box> + <ui:box> + <w:link id="enable" text="Enable" /> + </ui:box> + + $enable.action ++= function(v) { $field.enabled = !$field.enabled; } + + vexi.ui.frame = thisbox; + + </ui:box> +</vexi> Modified: branches/vexi3/org.vexi-vexi.widgets/src_poke/poke/widgets/datetime.t =================================================================== --- branches/vexi3/org.vexi-vexi.widgets/src_poke/poke/widgets/datetime.t 2013-11-13 11:22:53 UTC (rev 4572) +++ branches/vexi3/org.vexi-vexi.widgets/src_poke/poke/widgets/datetime.t 2013-11-13 19:23:19 UTC (rev 4573) @@ -10,6 +10,7 @@ <w:datetime fill="#ffff99" id="datetime"/> <w:weekfield fill="#ffff99" id="week"/> <w:monthfield fill="#ffff99" /> + <w:quarterfield fill="#ffff99" /> <w:yearfield fill="#ffff99" /> </ui:box> <ui:box id="set2" orient="vertical"> @@ -18,6 +19,7 @@ <w:weekfield /> <w:datetime /> <w:monthfield /> + <w:quarterfield /> <w:yearfield /> </ui:box> </ui:box> @@ -47,12 +49,10 @@ vexi.trace(v); }; + for (var i,b in $set1) + b.value ++= printValueTrap; $date.valuetype = "vexi.util.date"; - $time.value ++= printValueTrap; - $date.value ++= printValueTrap; - $week.value ++= printValueTrap; $datetime.valuetype = "vexi.js.Instant"; - $datetime.value ++= printValueTrap; vexi.ui.frame = thisbox; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access Free app hosting. Or install the open source package on any LAMP server. Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native! http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk _______________________________________________ Vexi-svn mailing list Vexi-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vexi-svn