]> source.dussan.org Git - vaadin-framework.git/commitdiff
Use required size instead of offset size (#8313)
authorLeif Åstrand <leif@vaadin.com>
Thu, 16 Feb 2012 08:04:00 +0000 (10:04 +0200)
committerLeif Åstrand <leif@vaadin.com>
Thu, 16 Feb 2012 08:04:00 +0000 (10:04 +0200)
Consistency with 6.x is otherwise broken in some cases where the
bounding rectangle gets rounded

src/com/vaadin/terminal/gwt/client/MeasuredSize.java

index 93642df7ecc199e80acff76d9a1a5b0bcf63ca8a..ddd408a1321c3a3e684e33f0d174edd497111f55 100644 (file)
@@ -196,13 +196,13 @@ public final class MeasuredSize {
         }
         this.borders = borders;
 
-        int offsetHeight = widget.getOffsetHeight();
+        int requiredHeight = Util.getRequiredHeight(widget);
         int marginHeight = sumHeights(margins);
-        setOuterHeight(offsetHeight + marginHeight);
+        setOuterHeight(requiredHeight + marginHeight);
 
-        int offsetWidth = widget.getOffsetWidth();
+        int requiredWidth = Util.getRequiredWidth(widget);
         int marginWidth = sumWidths(margins);
-        setOuterWidth(offsetWidth + marginWidth);
+        setOuterWidth(requiredWidth + marginWidth);
 
         // int i = 0;
         for (Entry<Element, int[]> entry : dependencySizes.entrySet()) {