Revision: 3094
http://vexi.svn.sourceforge.net/vexi/?rev=3094&view=rev
Author: clrg
Date: 2008-08-20 16:56:30 +0000 (Wed, 20 Aug 2008)
Log Message:
-----------
Make option more flexible to font/fontsize
Modified Paths:
--------------
trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/option.t
trunk/widgets/org.vexi.widgets/src/org/vexi/theme/classic/option.t
Modified: trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/option.t
===================================================================
--- trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/option.t
2008-08-20 02:13:55 UTC (rev 3093)
+++ trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/option.t
2008-08-20 16:56:30 UTC (rev 3094)
@@ -182,6 +182,7 @@
// close positively on enter
} else if (v == "enter") {
if (t.popped) t.popdown = true;
+ else t.action = true;
// keep original value
} else if (v == "escape") {
Modified: trunk/widgets/org.vexi.widgets/src/org/vexi/theme/classic/option.t
===================================================================
--- trunk/widgets/org.vexi.widgets/src/org/vexi/theme/classic/option.t
2008-08-20 02:13:55 UTC (rev 3093)
+++ trunk/widgets/org.vexi.widgets/src/org/vexi/theme/classic/option.t
2008-08-20 16:56:30 UTC (rev 3094)
@@ -13,7 +13,7 @@
<ui:box id="output" align="left" shrink="true" />
</lib:layout.pad>
</focusborder>
- <button id="button" width="18" minheight="18" shrink="true">
+ <button id="button" width="18" minheight="18" hshrink="true"
vshrink="false">
<ui:box fill="#d4d0c8" layout="layer">
<ui:box id="arrow" fill=":.image.arrowdown" shrink="true"
/>
</ui:box>
@@ -34,14 +34,18 @@
thisbox.v_prevfill = .settings..fill;
// assign static functions
- thisbox.focused ++= .focusborder..focusWrite;
- thisbox.popup ++= static.popupWrite;
- thisbox.popdown ++= static.popdownWrite;
- thisbox.width ++= static.widthWrite;
+ thisbox.focused ++= .focusborder..focusWrite;
+ thisbox.font ++= static.fontWrite;
+ thisbox.fontsize ++= static.fontWrite;
+ thisbox.popup ++= static.popupWrite;
+ thisbox.popdown ++= static.popdownWrite;
+ thisbox.width ++= static.widthWrite;
// pointer back to thisbox for static traps
$popbox.p_option = thisbox;
+ $focus.minheight = 6 + vexi.ui.font.height(font, fontsize, "dy");
+
/** grow content scrollpane */
$content.height ++= function(v) {
// FIXME: this is all a bit of a hack really - do it properly
@@ -69,6 +73,13 @@
</lib:widget.option>
<finalize />
+ /** set appropriate textbox size */
+ static.fontWrite = function(v) {
+ cascade = v;
+ var t = trapee.v_textbox;
+ trapee.th_focus.height = 6 + vexi.ui.font.height(t.font, t.fontsize,
"dy");
+ }
+
/** change button on popup */
static.popupWrite = function(v) {
cascade = v;
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 the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Vexi-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/vexi-svn