From 124f5b32e25c311b70be60d90d9790d9135eefa5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Leif=20=C3=85strand?= Date: Fri, 10 Feb 2012 11:20:51 +0200 Subject: [PATCH] Use minWidth to make room for caption reducing the size (#8313) --- .../vaadin/terminal/gwt/client/ui/layout/VLayoutSlot.java | 6 ++++-- 1 file 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(); -- 2.39.5