diff options
author | Teppo Kurki <teppo.kurki@vaadin.com> | 2015-08-18 21:46:39 +0300 |
---|---|---|
committer | Mika Murtojarvi <mika@vaadin.com> | 2015-08-25 16:14:52 +0300 |
commit | 37f772de6abdb6aafb85d426d532fc5fe83f2e23 (patch) | |
tree | 87a790aee0f4c0f005e1aefb610cc68f2b07f994 /client | |
parent | 760caadc951822b45d23ae4727d42d80fd8520f4 (diff) | |
download | vaadin-framework-37f772de6abdb6aafb85d426d532fc5fe83f2e23.tar.gz vaadin-framework-37f772de6abdb6aafb85d426d532fc5fe83f2e23.zip |
Cut off Grid cell content when max column width is set (#18617)
Change-Id: I912377ffe366e6ac46280b374fa04caa59c3bcf2
Diffstat (limited to 'client')
-rw-r--r-- | client/src/com/vaadin/client/widgets/Grid.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/client/src/com/vaadin/client/widgets/Grid.java b/client/src/com/vaadin/client/widgets/Grid.java index 369e530b9d..d7b31efd14 100644 --- a/client/src/com/vaadin/client/widgets/Grid.java +++ b/client/src/com/vaadin/client/widgets/Grid.java @@ -2799,8 +2799,9 @@ public class Grid<T> extends ResizeComposite implements for (Column<?, T> column : nonFixedColumns) { final int expandRatio = (defaultExpandRatios ? 1 : column .getExpandRatio()); - final double newWidth = column.getWidthActual(); final double maxWidth = getMaxWidth(column); + final double newWidth = Math.min(maxWidth, + column.getWidthActual()); boolean shouldExpand = newWidth < maxWidth && expandRatio > 0 && column != selectionColumn; if (shouldExpand) { @@ -2819,6 +2820,7 @@ public class Grid<T> extends ResizeComposite implements double pixelsToDistribute = escalator.getInnerWidth() - reservedPixels; if (pixelsToDistribute <= 0 || totalRatios <= 0) { + setColumnSizes(columnSizes); return; } |