aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/itmill/toolkit/terminal/gwt/client/ui/layout/ChildComponentContainer.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/itmill/toolkit/terminal/gwt/client/ui/layout/ChildComponentContainer.java b/src/com/itmill/toolkit/terminal/gwt/client/ui/layout/ChildComponentContainer.java
index 426c194253..73b92b360e 100644
--- a/src/com/itmill/toolkit/terminal/gwt/client/ui/layout/ChildComponentContainer.java
+++ b/src/com/itmill/toolkit/terminal/gwt/client/ui/layout/ChildComponentContainer.java
@@ -657,7 +657,11 @@ public class ChildComponentContainer extends Panel {
// Also update caption max width
if (caption != null) {
- caption.setMaxWidth(width);
+ if (caption.shouldBePlacedAfterComponent()) {
+ caption.setMaxWidth(captionWidth);
+ } else {
+ caption.setMaxWidth(width);
+ }
captionWidth = caption.getRenderedWidth();
}