]> source.dussan.org Git - vaadin-framework.git/commitdiff
Take additional padding into account when putting caption to the right
authorLeif Åstrand <leif@vaadin.com>
Tue, 17 Apr 2012 07:56:25 +0000 (10:56 +0300)
committerLeif Åstrand <leif@vaadin.com>
Tue, 17 Apr 2012 07:56:25 +0000 (10:56 +0300)
src/com/vaadin/terminal/gwt/client/ui/layout/VLayoutSlot.java

index 1ef63bcc880b1aed34ada44a9d6a344304cb2e84..f44d662e973efbdea7a34b53ed2900f118430aad 100644 (file)
@@ -76,10 +76,10 @@ public abstract class VLayoutSlot {
         } else {
             captionAboveCompnent = !caption.shouldBePlacedAfterComponent();
             if (!captionAboveCompnent) {
-                paddingRight += captionWidth;
                 availableWidth -= captionWidth;
                 captionStyle.clearLeft();
-                captionStyle.setRight(0, Unit.PX);
+                captionStyle.setRight(paddingRight, Unit.PX);
+                paddingRight += captionWidth;
             } else {
                 captionStyle.setLeft(0, Unit.PX);
                 captionStyle.clearRight();