]> source.dussan.org Git - vaadin-framework.git/commitdiff
Use minWidth to make room for caption reducing the size (#8313)
authorLeif Åstrand <leif@vaadin.com>
Fri, 10 Feb 2012 09:20:51 +0000 (11:20 +0200)
committerLeif Åstrand <leif@vaadin.com>
Fri, 10 Feb 2012 09:20:51 +0000 (11:20 +0200)
src/com/vaadin/terminal/gwt/client/ui/layout/VLayoutSlot.java

index 8581fade8d87b6c9b565c9d6069a55f43ab66f81..4567fcaad24bf6233048ae1857d4f300961160be 100644 (file)
@@ -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();