diff options
author | Leif Åstrand <leif@vaadin.com> | 2013-01-04 16:42:04 +0200 |
---|---|---|
committer | Leif Åstrand <leif@vaadin.com> | 2013-01-04 16:42:04 +0200 |
commit | bc9c49bda5a262f2146ae74964a1c52459f60f3f (patch) | |
tree | 656cf616a0a496629899d8179198a4abf2de843f | |
parent | f9bb88a3cd7c424126d96ba24e315569aec8bce9 (diff) | |
download | vaadin-framework-bc9c49bda5a262f2146ae74964a1c52459f60f3f.tar.gz vaadin-framework-bc9c49bda5a262f2146ae74964a1c52459f60f3f.zip |
Don't let the caption cause negative width (#10630)
Change-Id: I0d4964111fe72ee23b0d285c4c2340139c426c95
-rw-r--r-- | client/src/com/vaadin/client/ui/layout/VLayoutSlot.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/client/src/com/vaadin/client/ui/layout/VLayoutSlot.java b/client/src/com/vaadin/client/ui/layout/VLayoutSlot.java index 509499a5f9..125f135aee 100644 --- a/client/src/com/vaadin/client/ui/layout/VLayoutSlot.java +++ b/client/src/com/vaadin/client/ui/layout/VLayoutSlot.java @@ -90,6 +90,9 @@ public abstract class VLayoutSlot { captionAboveCompnent = !caption.shouldBePlacedAfterComponent(); if (!captionAboveCompnent) { availableWidth -= captionWidth; + if (availableWidth < 0) { + availableWidth = 0; + } captionStyle.clearLeft(); captionStyle.setRight(0, Unit.PX); style.setPaddingRight(captionWidth, Unit.PX); |