Revision: 2138
http://vexi.svn.sourceforge.net/vexi/?rev=2138&view=rev
Author: clrg
Date: 2007-09-06 15:38:44 -0700 (Thu, 06 Sep 2007)
Log Message:
-----------
Update dividers and separators
- be consistent with parent layout (i.e. horizontal separator is a vertical
line)
- use static trap functions where possible
- remove redundant (identical?) orient trap in win2k.divider
- reflect these changes in splitpane (notably the horizontal/vertical switch)
Modified Paths:
--------------
trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/separator.t
trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/splitpane.t
trunk/widgets/org.vexi.widgets/src/org/vexi/theme/win2k/divider.t
trunk/widgets/org.vexi.widgets/src/vexi/widget/separator.t
Modified: trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/separator.t
===================================================================
--- trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/separator.t
2007-09-06 22:21:36 UTC (rev 2137)
+++ trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/separator.t
2007-09-06 22:38:44 UTC (rev 2138)
@@ -13,16 +13,16 @@
static.orientFunc = function(v)
{
- if (v == "h" or v == "horizontal")
+ if (v == "horizontal")
{
+ trapee.hshrink = true;
+ trapee.vshrink = false;
+ }
+ else
+ {
trapee.hshrink = false;
trapee.vshrink = true;
}
- else if (v == "v" or v == "vertical")
- {
- trapee.hshrink = true;
- trapee.vshrink = false;
- }
cascade = v;
}
Modified: trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/splitpane.t
===================================================================
--- trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/splitpane.t
2007-09-06 22:21:36 UTC (rev 2137)
+++ trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/splitpane.t
2007-09-06 22:38:44 UTC (rev 2138)
@@ -107,7 +107,7 @@
th_holding.orient = v;
for (var i=0; th_holding.numchildren > i; i++)
{
- if (i%2) th_holding[i].orient = flip(v);
+ if (i%2) th_holding[i].orient = v;
else if (th_holding[i] != master)
{
th_holding[i][shr] = true;
@@ -135,7 +135,7 @@
if (th_holding.numchildren>0)
{
d = newdiv(vexi.box);
- d.orient = flip(orient);
+ d.orient = orient;
d.Press1 ++= pressFunc;
}
// assign new child and divider to holding
Modified: trunk/widgets/org.vexi.widgets/src/org/vexi/theme/win2k/divider.t
===================================================================
--- trunk/widgets/org.vexi.widgets/src/org/vexi/theme/win2k/divider.t
2007-09-06 22:21:36 UTC (rev 2137)
+++ trunk/widgets/org.vexi.widgets/src/org/vexi/theme/win2k/divider.t
2007-09-06 22:38:44 UTC (rev 2138)
@@ -5,29 +5,20 @@
<author>Charles Goodwin</author>
</meta:doc>
- <lib:divider cursor="hand">
+ <lib:divider redirect="null" cursor="hand" vshrink="true">
<ui:box align="center" maxwidth="18" minwidth="6" maxheight="18"
minheight="6">
<ui:box fill=".org.vexi.theme.win2k.image.rivets" />
</ui:box>
- orient ++= function(v)
- {
- if (v == "vertical")
- {
- hshrink = true;
- vshrink = false;
- }
- else
- {
- hshrink = false;
- vshrink = true;
- }
- cascade = v;
- }
+ active ++= static.activeFunc;
+ Enter ++= static.enterFunc;
+ Leave ++= static.leaveFunc;
- active ++= function(v) { cascade = v; fill = v ? "#e4e0d8" :
"#d4d0c8"; }
- Enter ++= function(v) { cascade = v; fill = "#e4e0d8"; }
- Leave ++= function(v) { cascade = v; if (!active) fill = "#d4d0c8"; }s
-
</lib:divider>
+
+ static.activeFunc = function(v) { cascade = v; trapee.fill = v ? "#e4e0d8"
: null; }
+ static.enterFunc = function(v) { cascade = v; trapee.fill = "#e4e0d8"; }
+ static.leaveFunc = function(v) { cascade = v; if (!trapee.active) fill =
null; }
+
+
</vexi>
Modified: trunk/widgets/org.vexi.widgets/src/vexi/widget/separator.t
===================================================================
--- trunk/widgets/org.vexi.widgets/src/vexi/widget/separator.t 2007-09-06
22:21:36 UTC (rev 2137)
+++ trunk/widgets/org.vexi.widgets/src/vexi/widget/separator.t 2007-09-06
22:38:44 UTC (rev 2138)
@@ -9,7 +9,7 @@
</usage>
</meta:doc>
- <ui:box redirect="null" orient="horizontal" type="separator">
+ <ui:box redirect="null" vshrink="true">
<lay:margin id="margin">
<separator id="widget" />
</lay:margin>
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Vexi-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/vexi-svn