Revision: 4302 http://vexi.svn.sourceforge.net/vexi/?rev=4302&view=rev Author: clrg Date: 2011-12-09 07:44:09 +0000 (Fri, 09 Dec 2011) Log Message: ----------- Feature fixing - configurable theme colours
Modified Paths: -------------- trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/layout/container.t trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/column.t 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/monthfield.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/scrollbar.t trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/settings.t trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/tab.t trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/toolbar.t trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/yearfield.t trunk/org.vexi-vexi.widgets/src_main/vexi/conf/settings.t trunk/org.vexi-vexi.widgets/src_main/vexi/conf/theme.t Modified: trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/layout/container.t =================================================================== --- trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/layout/container.t 2011-12-07 04:28:27 UTC (rev 4301) +++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/layout/container.t 2011-12-09 07:44:09 UTC (rev 4302) @@ -1,4 +1,4 @@ -<!-- Copyright 2009 - see COPYING for details [LGPL] --> +<!-- Copyright 2011 - see COPYING for details [LGPL] --> <vexi xmlns:ui="vexi://ui" xmlns:meta="vexi://meta" xmlns:util="vexi.util"> <meta:doc> @@ -18,6 +18,11 @@ targets v_fillbox and v_textbox will be automatically assigned to v_content as well. To override v_fillbox or v_textbox, either specify them manually or set them to 'false' to opt out. + + Also checks for 'v_init' object which widgets can is used to + initialize properties. + + thisbox.v_init = { prop1: val1, prop2: val2 }; </usage> </meta:doc> Modified: trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/column.t =================================================================== --- trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/column.t 2011-12-07 04:28:27 UTC (rev 4301) +++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/column.t 2011-12-09 07:44:09 UTC (rev 4302) @@ -22,6 +22,8 @@ </ui:box> </ui:box> + thisbox.v_init = static.init; + thisbox.active ++= static.activeWrite; thisbox.enabled ++= static.normalWrite; thisbox.hover ++= static.normalWrite; @@ -95,6 +97,8 @@ </bevel> + static.init = { fill : .settings..widgetfill }; + static.activeWrite = function(v) { cascade = v; trapee.form = "down"; } static.normalWrite = function(v) { cascade = v; trapee.form = trapee.enabled ? (trapee.selected ? "down" : "up") : "thinup"; } 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-12-07 04:28:27 UTC (rev 4301) +++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/combo.t 2011-12-09 07:44:09 UTC (rev 4302) @@ -19,7 +19,7 @@ </lib:layout.pad> </lib.focusborder> <button id="button" width="18" minheight="18" shrink="false"> - <ui:box fill="#d4d0c8" layout="layer"> + <ui:box layout="layer"> <ui:box id="arrow" fill=":.image.arrowdown" shrink="true" /> </ui:box> </button> 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 2011-12-07 04:28:27 UTC (rev 4301) +++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/datefield.t 2011-12-09 07:44:09 UTC (rev 4302) @@ -16,10 +16,10 @@ <util:date /> <bevel blockPress="true" form="down" margin="3" shrink="true"> <ui:box id="button" layout="layer" hshrink="true"> - <classic:button id="select" cursor="hand" fill="#d4d0c8" focusable="false" margin="0" shrink="false" /> + <classic: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="day" /> <util:digit id="sep1" fieldsize="1" text="/" /> @@ -51,8 +51,11 @@ thisbox.yearview = $year; thisbox.sep1 = $sep1; thisbox.sep2 = $sep2; + 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; //////// @@ -166,13 +169,11 @@ thisbox.enabled ++= function(v) { cascade = v; var max = vexi.ui.maxdim; - form = v ? "down" : "thindown"; $button.maxheight = v ? max : 0; $select.enabled = v; $moreless.maxheight = v ? max : 0; $more.enabled = v; $less.enabled = v; - $bg.fill = v ? "white" : null;//"#d4d0c8"; } thisbox.focused ++= function(v) { @@ -272,7 +273,10 @@ selected = $day; </bevel> + <lib.finalize /> + static.init = { fill : .settings..fill }; + static.initDatePicker = function(datefield, datepicker_box) { // apply datepicker to box .datepicker(datepicker_box); @@ -382,9 +386,6 @@ static.valueRead = function() { switch (trapee.valuetype) { - case "string": - var t = trapee.text; - return t ? t : null; case "vexi.util.date": if (trapee.year==null) return null; @@ -398,8 +399,10 @@ trapee.day); case "date": case "number": throw "unimplemented"; + case "string": default: - return null; + var t = trapee.text; + return t ? t : null; } } 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 2011-12-07 04:28:27 UTC (rev 4301) +++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/monthfield.t 2011-12-09 07:44:09 UTC (rev 4302) @@ -15,10 +15,10 @@ <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" /> + <classic: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="month" period="month"/> <util:digit id="sep" fieldsize="1" text="/" /> @@ -44,6 +44,8 @@ thisbox.datepicker = $datepicker; thisbox.dateview = $dateview; thisbox.sep = $sep; + thisbox.th_bevel = thisbox; + thisbox.v_init = static.init; thisbox.v_popbox = $popbox; thisbox.v_textbox = false; @@ -215,6 +217,8 @@ </bevel> + static.init = .datefield..init; + var initDatePicker = function(datefield, datepicker_box) { // apply datepicker to box .datepicker(datepicker_box); 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 2011-12-07 04:28:27 UTC (rev 4301) +++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/option.t 2011-12-09 07:44:09 UTC (rev 4302) @@ -14,7 +14,7 @@ </lib:layout.pad> </lib.focusborder> <button id="button" width="18" minheight="18" hshrink="true" vshrink="false"> - <ui:box fill="#d4d0c8" layout="layer"> + <ui:box layout="layer"> <ui:box id="arrow" fill=":.image.arrowdown" shrink="true" /> </ui:box> </button> Modified: trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/scrollbar.t =================================================================== --- trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/scrollbar.t 2011-12-07 04:28:27 UTC (rev 4301) +++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/scrollbar.t 2011-12-09 07:44:09 UTC (rev 4302) @@ -8,16 +8,16 @@ <lib:scrollbar /> <ui:box lineshift="20" minthumbsize="8"> - <button id="back" fill="#d4d0c8" width="16" height="16" repeats="true" shrink="true"> + <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> <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="#d4d0c8" form="up" /> + <bevel fill=":.settings..widgetfill" form="up" /> </role:draggable> </role:clickable> - <button id="next" fill="#d4d0c8" width="16" height="16" repeats="true" shrink="true"> + <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> Modified: trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/settings.t =================================================================== --- trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/settings.t 2011-12-07 04:28:27 UTC (rev 4301) +++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/settings.t 2011-12-09 07:44:09 UTC (rev 4302) @@ -12,6 +12,7 @@ static.fill_disabled = "#d4d0c8"; static.fill_selected = "#00008b"; // darkblue static.fill_selected_unfocused = "#666666"; + static.panefill = "#d4d0c8"; static.surfacefill = "#d4d0c8"; static.tabfill = "#d4d0c8"; static.tabfill_unselected = "#c4c0b8"; @@ -21,6 +22,7 @@ static.themeauthor = "Charles Goodwin"; static.themename = "Classic"; static.themepath = "org.vexi.theme.classic"; + static.widgetfill = "#d4d0c8"; // preload images so they don't get dropped static.imagecache = .preload(vexi.box); Modified: trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/tab.t =================================================================== --- trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/tab.t 2011-12-07 04:28:27 UTC (rev 4301) +++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/tab.t 2011-12-09 07:44:09 UTC (rev 4302) @@ -10,7 +10,7 @@ <ui:box redirect=":$content" hshrink="true" margin="2 0" padding="2 6"> <ui:box layout="layer" align="bottom"> <lay:border border=":.image.tabtop"> - <lay:pad id="pad" padding="3" fill="#d4d0c8"> + <lay:pad id="pad" padding="3" fill=":.settings..tabfill"> <lib.focusborder id="focus"> <ui:box id="content" minheight="16" /> </lib.focusborder> Modified: trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/toolbar.t =================================================================== --- trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/toolbar.t 2011-12-07 04:28:27 UTC (rev 4301) +++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/toolbar.t 2011-12-09 07:44:09 UTC (rev 4302) @@ -9,5 +9,11 @@ <lib:toolbar /> <bevel redirect=":$content" form="thinup" padding="1"> <ui:box id="content" /> + + thisbox.v_init = static.init; + </bevel> + + static.init = { fill: .settings..panefill }; + </vexi> 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 2011-12-07 04:28:27 UTC (rev 4301) +++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/yearfield.t 2011-12-09 07:44:09 UTC (rev 4302) @@ -15,10 +15,10 @@ <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" /> + <classic: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" /> </ui:box> @@ -42,6 +42,8 @@ thisbox.datepicker = $datepicker; thisbox.dateview = $dateview; thisbox.sep = $sep; + thisbox.th_bevel = thisbox; + thisbox.v_init = static.init; thisbox.v_popbox = $popbox; thisbox.v_textbox = false; @@ -210,6 +212,8 @@ </bevel> + static.init = .datefield..init; + var initDatePicker = function(datefield, datepicker_box) { // apply datepicker to box .datepicker(datepicker_box); Modified: trunk/org.vexi-vexi.widgets/src_main/vexi/conf/settings.t =================================================================== --- trunk/org.vexi-vexi.widgets/src_main/vexi/conf/settings.t 2011-12-07 04:28:27 UTC (rev 4301) +++ trunk/org.vexi-vexi.widgets/src_main/vexi/conf/settings.t 2011-12-09 07:44:09 UTC (rev 4302) @@ -1,11 +1,9 @@ -<!-- Copyright 2009 - see COPYING for details [LGPL] --> +<!-- Copyright 2011 - see COPYING for details [LGPL] --> -<vexi xmlns:ui="vexi://ui" xmlns:meta="vexi://meta"> - <meta:doc> - <author>Charles Goodwin</author> - </meta:doc> +<vexi xmlns:ui="vexi://js"> + <js:Object /> - <ui:box /> + // Default general settings static.date_textformat = "DDMMYYYY"; static.date_valueformat = "YYYYMMDD"; Modified: trunk/org.vexi-vexi.widgets/src_main/vexi/conf/theme.t =================================================================== --- trunk/org.vexi-vexi.widgets/src_main/vexi/conf/theme.t 2011-12-07 04:28:27 UTC (rev 4301) +++ trunk/org.vexi-vexi.widgets/src_main/vexi/conf/theme.t 2011-12-09 07:44:09 UTC (rev 4302) @@ -1,5 +1,10 @@ -<!-- provides the location to look for the theme --> -<vexi xmlns:ui="vexi://ui"> - <ui:box /> +<!-- Copyright 2011 - see COPYING for details [LGPL] --> + +<vexi xmlns:ui="vexi://js"> + <js:Object /> + + // Provides the location to look for the default theme + static.location = vexi..org.vexi.theme.classic; -</vexi> \ No newline at end of file + +</vexi> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Cloud Services Checklist: Pricing and Packaging Optimization This white paper is intended to serve as a reference, checklist and point of discussion for anyone considering optimizing the pricing and packaging model of a cloud services business. Read Now! http://www.accelacomm.com/jaw/sfnl/114/51491232/ _______________________________________________ Vexi-svn mailing list Vexi-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vexi-svn