Revision: 4639
http://sourceforge.net/p/vexi/code/4639
Author: clrg
Date: 2014-01-08 19:16:50 +0000 (Wed, 08 Jan 2014)
Log Message:
-----------
Bevel / tab improvement
- tabtop bevel-based rather than image-based
- shadecolor / shinecolor properties for bevel as white/black don't work on
white/black!
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/tab.t
branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/tabpane.t
Removed Paths:
-------------
branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/image/tabtop/
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
2014-01-08 03:08:24 UTC (rev 4638)
+++
branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/bevel.t
2014-01-08 19:16:50 UTC (rev 4639)
@@ -50,78 +50,101 @@
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;
-
+ thisbox.shinecolor = "ffffff";
+ thisbox.shadecolor = "000000";
+
+ const refill = function(newfillbox) {
+ // re-fill
+ if (newfillbox != fillbox) {
+ newfillbox.fill = fillbox.fill;
+ fillbox.fill = null;
+ fillbox = newfillbox;
+ }
+ }
+
+ const makeBevel = function() {
// bevel colours
var outer1, outer2, outer3, inner1, inner2, inner3;
// might want to adjust fill box
- var nextfillbox = $outer;
+ var newfillbox = $outer;
- if (v!=null) {
- switch(v) {
+ if (form!=null) {
+ switch(form) {
case "thinup":
- outer1 = "#ffffff";
- outer2 = "#3fffffff";//"#c0c0c0";
- outer3 = "#69000000";//"#7b7d7b";
- nextfillbox = $inner;
+ outer1 = "#"+shinecolor;
+ outer2 = "#3f"+shinecolor;//"#c0c0c0";
+ outer3 = "#69"+shadecolor;//"#7b7d7b";
+ newfillbox = $inner;
break;
case "thindown":
- outer1 = "#69000000";//"#7b7d7b";
- outer2 = "#3fffffff";//"#c0c0c0";
- outer3 = "#ffffff";
- nextfillbox = $inner;
+ outer1 = "#69"+shadecolor;//"#7b7d7b";
+ outer2 = "#3f"+shinecolor;//"#c0c0c0";
+ outer3 = "#"+shinecolor;
+ newfillbox = $inner;
break;
case "up":
- outer1 = "#ffffff";
- outer2 = "#a6000000";//"#404040";
- outer3 = "#a6000000";//"#404040";
- inner1 = "#3fffffff";//"#c0c0c0";
- inner2 = "#5a000000";//"#808080";
- inner3 = "#5a000000";//"#808080";
- nextfillbox = $outer;
+ outer1 = "#"+shinecolor;
+ outer2 = "#a6"+shadecolor;//"#404040";
+ outer3 = "#a6"+shadecolor;//"#404040";
+ inner1 = "#3f"+shinecolor;//"#c0c0c0";
+ inner2 = "#5a"+shadecolor;//"#808080";
+ inner3 = "#5a"+shadecolor;//"#808080";
+ newfillbox = $outer;
break;
case "down":
- outer1 = "#a6000000";//"#404040";
- outer2 = "#ffffff";
- outer3 = "#ffffff";
- inner1 = "#5a000000";//"#808080";
- inner2 = "#3fffffff";//"#c0c0c0";
- inner3 = "#3fffffff";//"#c0c0c0";
- nextfillbox = $content;
+ outer1 = "#a6"+shadecolor;//"#404040";
+ outer2 = "#"+shinecolor;
+ outer3 = "#"+shinecolor;
+ inner1 = "#5a"+shadecolor;//"#808080";
+ inner2 = "#3f"+shinecolor;//"#c0c0c0";
+ inner3 = "#3f"+shinecolor;//"#c0c0c0";
+ newfillbox = $content;
break;
case "flat":
- outer1 = "#5a000000";//"#808080";
- outer3 = "#ffffff";
- inner1 = "#ffffff";
- inner2 = "#5a000000";//"#808080";
- inner3 = "#5a000000";//"#808080";
- nextfillbox = $inner;
+ outer1 = "#5a"+shadecolor;//"#808080";
+ outer3 = "#"+shinecolor;
+ inner1 = "#"+shinecolor;
+ inner2 = "#5a"+shadecolor;//"#808080";
+ inner3 = "#5a"+shadecolor;//"#808080";
+ newfillbox = $inner;
break;
case "above":
- outer1 = "#3fffffff";//"#c0c0c0";
- outer2 = "#a6000000";//"#404040";
- outer3 = "#a6000000";//"#404040";
- inner1 = "#ffffff";
- inner2 = "#5a000000";//"#808080";
- inner3 = "#5a000000";//"#808080";
- nextfillbox = $inner;
+ outer1 = "#3f"+shinecolor;//"#c0c0c0";
+ outer2 = "#a6"+shadecolor;//"#404040";
+ outer3 = "#a6"+shadecolor;//"#404040";
+ inner1 = "#"+shinecolor;
+ inner2 = "#5a"+shadecolor;//"#808080";
+ inner3 = "#5a"+shadecolor;//"#808080";
+ newfillbox = $inner;
break;
+ case "tabtop":
+ trace(shinecolor+", "+shadecolor);
+ $outer_nn.fill = "#"+shinecolor;//"#c0c0c0";
+ $outer_nw.fill = null;
+ $outer_ww.fill = "#"+shinecolor;//"#c0c0c0";
+ $outer_ne.fill = null;
+ $outer_sw.fill = null;
+ $outer_ee.fill = "#a6"+shadecolor;//"#808080";
+ $outer_se.fill = null;
+ $outer_ss.fill = null;
+ $inner_nn.fill = "#3f"+shinecolor;//"#c0c0c0";
+ $inner_nw.fill = "#3f"+shinecolor;//"#c0c0c0";
+ $inner_ww.fill = "#3f"+shinecolor;//"#c0c0c0";
+ $inner_ne.fill = "#5a"+shadecolor;//"#808080";
+ $inner_sw.fill = "#3f"+shinecolor;//"#c0c0c0";
+ $inner_ee.fill = "#5a"+shadecolor;//"#808080";
+ $inner_se.fill = "#5a"+shadecolor;//"#808080";
+ $inner_ss.fill = null;
+ refill($inner);
+ return;
}
}
- // re-fill
- if (nextfillbox != fillbox) {
- nextfillbox.fill = fillbox.fill;
- fillbox.fill = null;
- fillbox = nextfillbox;
- }
+ refill(newfillbox);
$outer_nn.fill = outer1;
$outer_nw.fill = outer1;
@@ -141,5 +164,16 @@
$inner_ss.fill = inner3;
}
+ const doUpdate = function(v) {
+ if (trapee[trapname]!=v) {
+ cascade = v;
+ makeBevel();
+ }
+ }
+
+ thisbox.form ++= doUpdate;
+ thisbox.shadecolor ++= doUpdate;
+ thisbox.shinecolor ++= doUpdate;
+
</ui:box>
</vexi>
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
2014-01-08 03:08:24 UTC (rev 4638)
+++ branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/tab.t
2014-01-08 19:16:50 UTC (rev 4639)
@@ -1,6 +1,6 @@
<!-- Copyright 2013 - see COPYING for details [LGPL] -->
-<vexi xmlns:ui="vexi://ui" xmlns:meta="vexi://meta" xmlns="vexi.theme"
+<vexi xmlns:ui="vexi://ui" xmlns:meta="vexi://meta"
xmlns="org.vexi.theme.classic"
xmlns:lib="org.vexi.lib" xmlns:lay="org.vexi.lib.layout">
<meta:doc>
<author>Charles Goodwin</author>
@@ -9,7 +9,7 @@
<lib:widget.tab />
<ui:box redirect=":$content" hshrink="true" margin="2 0" padding="2 6">
<ui:box layout="layer" align="bottom">
- <lay:border border=":.image.tabtop">
+ <bevel id="bevel" form="tabtop">
<lay:pad id="pad" padding="3" fill=":.settings..tabfill">
<lib.focusborder id="focus">
<ui:box id="content" minheight="16" />
@@ -21,7 +21,7 @@
</lib:role.clickable>
</ui:box>
</lay:pad>
- </lay:border>
+ </bevel>
<ui:box height="2">
<ui:box width="1" />
<ui:box id="overfill" height="2" fill=":.settings..tabfill" />
@@ -36,6 +36,11 @@
thisbox.th_focus = $focus;
thisbox.v_fillbox = $pad;
+ const toBevel = function(v) { $bevel[trapname] = v; }
+
+ thisbox.shadecolor ++= toBevel;
+ thisbox.shinecolor ++= toBevel;
+
// assign static traps
thisbox.enabled ++= static.enableWrite;
thisbox.selected ++= static.selectWrite;
Modified:
branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/tabpane.t
===================================================================
---
branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/tabpane.t
2014-01-08 03:08:24 UTC (rev 4638)
+++
branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/tabpane.t
2014-01-08 19:16:50 UTC (rev 4639)
@@ -1,4 +1,4 @@
-<!-- Copyright 2013 - see COPYING for details [LGPL] -->
+<!-- Copyright 2014 - see COPYING for details [LGPL] -->
<vexi xmlns:ui="vexi://ui"
xmlns:role="org.vexi.lib.role"
@@ -37,7 +37,12 @@
thisbox.th_prev = $prev;
thisbox.th_tablist = $tablist;
- var hideTabsTrap = function(v) {
+ const toBevel = function(v) { $content[trapname] = v; }
+
+ thisbox.shadecolor ++= toBevel;
+ thisbox.shinecolor ++= toBevel;
+
+ const hideTabsTrap = function(v) {
cascade = v;
var hide = hidetabs and 1 >= v_content.numchildren;
$wrap.display = !hide;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Vexi-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/vexi-svn