summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2012-02-10 11:20:51 +0200
committerLeif Åstrand <leif@vaadin.com>2012-02-10 11:20:51 +0200
commit124f5b32e25c311b70be60d90d9790d9135eefa5 (patch)
tree9a98deffb3f3337ac092d3eed03291269e0e6eeb
parentfb0835bd6d2780e0721771425eed5f03a1cc0b64 (diff)
downloadvaadin-framework-124f5b32e25c311b70be60d90d9790d9135eefa5.tar.gz
vaadin-framework-124f5b32e25c311b70be60d90d9790d9135eefa5.zip
Use minWidth to make room for caption reducing the size (#8313)
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/layout/VLayoutSlot.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ui/layout/VLayoutSlot.java b/src/com/vaadin/terminal/gwt/client/ui/layout/VLayoutSlot.java
index 8581fade8d..4567fcaad2 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/layout/VLayoutSlot.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/layout/VLayoutSlot.java
@@ -59,9 +59,11 @@ public abstract class VLayoutSlot {
Style style = wrapper.getStyle();
if (isRelativeWidth()) {
- style.setWidth(allocatedSpace, Unit.PX);
+ style.setPropertyPx("width", (int) allocatedSpace);
+ style.clearProperty("minWidth");
} else {
- style.setWidth(getUsedWidth(), Unit.PX);
+ style.clearProperty("width");
+ style.setPropertyPx("minWidth", getCaptionWidth());
}
VCaption caption = getCaption();