Revision: 3551 http://vexi.svn.sourceforge.net/vexi/?rev=3551&view=rev Author: clrg Date: 2009-07-14 01:17:26 +0000 (Tue, 14 Jul 2009)
Log Message: ----------- More option/combo improvements Modified Paths: -------------- trunk/widgets/org.vexi.widgets/src/org/vexi/theme/classic/combo.t trunk/widgets/org.vexi.widgets/src/org/vexi/theme/classic/option.t Modified: trunk/widgets/org.vexi.widgets/src/org/vexi/theme/classic/combo.t =================================================================== --- trunk/widgets/org.vexi.widgets/src/org/vexi/theme/classic/combo.t 2009-07-13 16:43:36 UTC (rev 3550) +++ trunk/widgets/org.vexi.widgets/src/org/vexi/theme/classic/combo.t 2009-07-14 01:17:26 UTC (rev 3551) @@ -39,31 +39,21 @@ // pointer back to thisbox for static traps $popbox.p_option = thisbox; + $content.p_option = thisbox; // inherit static functions from classic.option thisbox.focused ++= .focusborder..focusWrite; thisbox.popup ++= .option..popupWrite; thisbox.popdown ++= .option..popdownWrite; thisbox.width ++= .option..widthWrite; + $content.contentheight ++= .option..contentwidthWrite; thisbox.v_container ++= function(v) { cascade = v; v_fillbox = $focus; - v_textbox = $edit.v_edit; + v_textbox = $edit; } - /** grow content scrollpane */ - $content.height ++= function(v) { - // FIXME: this is all a bit of a hack really - do it properly - if (!popped) { cascade = v; return true; } - var f = surface.frame; - var newh = f.height-f.distanceto($popbox).y; - if ($scroll.scrollvertical) - newh = maxlistheight>newh ? newh : maxlistheight; - $scroll.minheight = v>newh ? newh : v; - cascade = v; - } - thisbox.surfaceWidth = function(dx, sw) { v_popbox.surface_x = vexi.math.min(dx+marginleft, vexi.math.max(0, sw-v_popbox.width)); 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 2009-07-13 16:43:36 UTC (rev 3550) +++ trunk/widgets/org.vexi.widgets/src/org/vexi/theme/classic/option.t 2009-07-14 01:17:26 UTC (rev 3551) @@ -41,7 +41,8 @@ thisbox.popdown ++= static.popdownWrite; thisbox.visible ++= static.visibleWrite; thisbox.constrainwidth ++= static.constrainwidthWrite; - thisbox.v_popbox.contentwidth ++= static.listwidthWrite; + $popbox.contentwidth ++= static.listwidthWrite; + $content.contentheight ++= static.contentheightWrite; thisbox.v_container ++= function(v) { cascade = v; @@ -51,22 +52,10 @@ // markers for static traps $popbox.p_option = thisbox; - $popbox.th_focus = $focus; + $content.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 - if (!popped) { cascade = v; return true; } - var f = surface.frame; - var newh = f.height-f.distanceto($popbox).y; - if ($scroll.scrollvertical) - newh = maxlistheight>newh ? newh : maxlistheight; - $scroll.minheight = v>newh ? newh : v; - cascade = v; - } - thisbox.surfaceWidth = function(dx, sw) { v_popbox.surface_x = vexi.math.min(dx+marginleft, vexi.math.max(0, sw-v_popbox.width)); @@ -80,6 +69,13 @@ </lib:widget.option> <finalize /> + /** grow content scrollpane */ + static.contentheightWrite = function(v) { + cascade = v; + var p = trapee.p_option; + p.th_scroll.minheight = v>p.maxlistheight ? p.maxlistheight : v; + } + /** set appropriate textbox size */ static.fontWrite = function(v) { cascade = v; @@ -108,7 +104,7 @@ /** match option width to list width */ static.listwidthWrite = function(v) { cascade = v; - trapee.th_focus.minwidth = v-2; + trapee.p_option.th_focus.minwidth = v-2; } /** need to forcereflow for it to work */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge _______________________________________________ Vexi-svn mailing list Vexi-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vexi-svn