summaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/terminal
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/vaadin/terminal')
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/AbstractBoxLayoutConnector.java15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ui/AbstractBoxLayoutConnector.java b/src/com/vaadin/terminal/gwt/client/ui/AbstractBoxLayoutConnector.java
index 25d917b7e8..854b02018f 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/AbstractBoxLayoutConnector.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/AbstractBoxLayoutConnector.java
@@ -216,6 +216,17 @@ public abstract class AbstractBoxLayoutConnector extends
hasRelativeHeight.clear();
needsMeasure.clear();
+ boolean equalExpandRatio = getWidget().vertical ? !isUndefinedHeight()
+ : !isUndefinedWidth();
+ for (ComponentConnector child : getChildren()) {
+ double expandRatio = getState().getChildData().get(child)
+ .getExpandRatio();
+ if (expandRatio > 0) {
+ equalExpandRatio = false;
+ break;
+ }
+ }
+
for (ComponentConnector child : getChildren()) {
Slot slot = getWidget().getSlot(child);
@@ -225,7 +236,9 @@ public abstract class AbstractBoxLayoutConnector extends
double expandRatio = getState().getChildData().get(child)
.getExpandRatio();
- if (expandRatio == 0) {
+ if (equalExpandRatio) {
+ expandRatio = 1;
+ } else if (expandRatio == 0) {
expandRatio = -1;
}
slot.setExpandRatio(expandRatio);