Revision: 3575
http://vexi.svn.sourceforge.net/vexi/?rev=3575&view=rev
Author: clrg
Date: 2009-07-31 16:45:28 +0000 (Fri, 31 Jul 2009)
Log Message:
-----------
Tweak option/combo/scrollpane behaviour
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
trunk/widgets/org.vexi.widgets/src/org/vexi/theme/classic/scrollpane.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-30 15:44:22 UTC (rev 3574)
+++ trunk/widgets/org.vexi.widgets/src/org/vexi/theme/classic/combo.t
2009-07-31 16:45:28 UTC (rev 3575)
@@ -46,7 +46,8 @@
thisbox.focused ++= .focusborder..focusWrite;
thisbox.popup ++= .option..popupWrite;
thisbox.popdown ++= .option..popdownWrite;
- $focus.width ++= .option..widthWrite;
+ thisbox.width ++= .option..widthWrite;
+ $content.contentwidth ++= .option..listwidthWrite;
$content.contentheight ++= .option..contentheightWrite;
thisbox.v_container ++= function(v) {
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-30 15:44:22 UTC (rev 3574)
+++ trunk/widgets/org.vexi.widgets/src/org/vexi/theme/classic/option.t
2009-07-31 16:45:28 UTC (rev 3575)
@@ -8,16 +8,18 @@
<lib:widget.option redirect=":$content" margin="3" maxlistheight="160"
vshrink="true">
<bevel form="down">
- <focusborder id="focus" align="left" fill="white" layout="place">
- <lib:layout.pad id="pad" padding="3">
- <ui:box id="output" align="left" />
- </lib:layout.pad>
- </focusborder>
- <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>
- </button>
+ <ui:box id="wrap">
+ <focusborder id="focus" align="left" fill="white"
layout="place">
+ <lib:layout.pad id="pad" padding="3">
+ <ui:box id="output" align="left" />
+ </lib:layout.pad>
+ </focusborder>
+ <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>
+ </button>
+ </ui:box>
</bevel>
<lib:layout.border id="popbox" border="black" depth="1">
<scrollpane id="scroll" autohidevertical="true" fill="white"
scrollhorizontal="false">
@@ -30,6 +32,7 @@
thisbox.th_button = $button;
thisbox.th_focus = $focus;
thisbox.th_scroll = $scroll;
+ thisbox.th_wrap = $wrap;
thisbox.v_popbox = $popbox;
thisbox.v_prevfill = .settings..fill;
@@ -41,7 +44,7 @@
thisbox.popdown ++= static.popdownWrite;
thisbox.visible ++= static.visibleWrite;
thisbox.width ++= static.widthWrite;
- $popbox.contentwidth ++= static.listwidthWrite;
+ $content.contentwidth ++= static.listwidthWrite;
$content.contentheight ++= static.contentheightWrite;
thisbox.v_container ++= function(v) {
@@ -101,13 +104,13 @@
cascade = v;
var surroundwidth = v-2-trapee.marginleft-trapee.marginright;
trapee.th_focus.maxwidth = surroundwidth-20;
- trapee.v_popbox.minwidth = surroundwidth;
+ trapee.v_popbox.minwidth = surroundwidth-1;
}
/** match option width to list width */
static.listwidthWrite = function(v) {
cascade = v;
- trapee.p_option.th_focus.minwidth = v-2;
+ trapee.p_option.th_focus.minwidth = v;
}
/** need to forcereflow for it to work */
Modified: trunk/widgets/org.vexi.widgets/src/org/vexi/theme/classic/scrollpane.t
===================================================================
--- trunk/widgets/org.vexi.widgets/src/org/vexi/theme/classic/scrollpane.t
2009-07-30 15:44:22 UTC (rev 3574)
+++ trunk/widgets/org.vexi.widgets/src/org/vexi/theme/classic/scrollpane.t
2009-07-31 16:45:28 UTC (rev 3575)
@@ -26,12 +26,13 @@
$hscroll.height ++= function(v) { $inset.height = v; cascade = v; }
$vscroll.width ++= function(v) { $inset.width = v; cascade = v; }
+ // REMARK: once the scrollbars are shown, they fix the minimum size
+ // in order to prevent a loop where the scrollbars appear increasing
+ // the size of $view beyond the content size, hiding the scrollbars
+
$hscroll.contentwidth ++= function(v) { $view.minwidth = v; cascade =
v; }
$vscroll.contentheight ++= function(v) { $view.minheight = v; cascade
= v; }
- $hscroll.forcereflow();
- $vscroll.forcereflow();
-
$hscroll.display ++= function(v) { $inset.display = (v and
$vscroll.display); cascade = v; }
$vscroll.display ++= function(v) { $inset.display = (v and
$hscroll.display); cascade = v; }
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Vexi-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/vexi-svn