From: Leif Åstrand Date: Fri, 10 Feb 2012 09:20:51 +0000 (+0200) Subject: Use minWidth to make room for caption reducing the size (#8313) X-Git-Tag: 7.0.0.alpha2~434^2~67 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=124f5b32e25c311b70be60d90d9790d9135eefa5;p=vaadin-framework.git Use minWidth to make room for caption reducing the size (#8313) --- 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();