diff options
author | Teemu Suo-Anttila <teemusa@vaadin.com> | 2015-08-24 13:57:27 +0300 |
---|---|---|
committer | Mika Murtojarvi <mika@vaadin.com> | 2015-08-25 16:32:42 +0300 |
commit | f6ac86984881ab56eba09f5604bea9aaf0a6aafb (patch) | |
tree | adb13602f3014cf2472014d6d387750bdc288539 /client | |
parent | 3e82c958bb25495867ae72f423102acb11a08427 (diff) | |
download | vaadin-framework-f6ac86984881ab56eba09f5604bea9aaf0a6aafb.tar.gz vaadin-framework-f6ac86984881ab56eba09f5604bea9aaf0a6aafb.zip |
Fix Grid column width calculation regression (#18617)
Change-Id: I359240ff393428dd5d6764d5e01a40022ab94fc6
Diffstat (limited to 'client')
-rw-r--r-- | client/src/com/vaadin/client/widgets/Grid.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/client/src/com/vaadin/client/widgets/Grid.java b/client/src/com/vaadin/client/widgets/Grid.java index d7b31efd14..570ba61c17 100644 --- a/client/src/com/vaadin/client/widgets/Grid.java +++ b/client/src/com/vaadin/client/widgets/Grid.java @@ -2780,7 +2780,9 @@ public class Grid<T> extends ResizeComposite implements for (Column<?, T> column : visibleColumns) { final double widthAsIs = column.getWidth(); final boolean isFixedWidth = widthAsIs >= 0; - final double widthFixed = Math.max(widthAsIs, + // Check for max width just to be sure we don't break the limits + final double widthFixed = Math.max( + Math.min(getMaxWidth(column), widthAsIs), column.getMinimumWidth()); defaultExpandRatios = defaultExpandRatios && (column.getExpandRatio() == -1 || column == selectionColumn); @@ -2820,7 +2822,10 @@ public class Grid<T> extends ResizeComposite implements double pixelsToDistribute = escalator.getInnerWidth() - reservedPixels; if (pixelsToDistribute <= 0 || totalRatios <= 0) { - setColumnSizes(columnSizes); + if (pixelsToDistribute <= 0) { + // Set column sizes for expanding columns + setColumnSizes(columnSizes); + } return; } |