summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2015-02-06 01:35:31 +0200
committerJohannes Dahlström <johannesd@vaadin.com>2015-11-05 09:56:56 +0000
commitbd53f3391e2ad56cd587c74c03804c2ce801bd26 (patch)
tree026f44e555eaeefec0c98adb3f42f7d969cfb2b2 /client
parent0a465bbe6d1f585451aee01f49c1cf94c47148dd (diff)
downloadvaadin-framework-bd53f3391e2ad56cd587c74c03804c2ce801bd26.tar.gz
vaadin-framework-bd53f3391e2ad56cd587c74c03804c2ce801bd26.zip
Correctly round tr width in Escalator (#18820)
* screenshot based tests for all themes for various features in Grid Change-Id: Ic6bbb402194132aaf87833215891f5f4ff931099
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/widgets/Escalator.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/client/src/com/vaadin/client/widgets/Escalator.java b/client/src/com/vaadin/client/widgets/Escalator.java
index 64f18293e4..8a893337c5 100644
--- a/client/src/com/vaadin/client/widgets/Escalator.java
+++ b/client/src/com/vaadin/client/widgets/Escalator.java
@@ -1756,7 +1756,13 @@ public class Escalator extends Widget implements RequiresResize,
Element row = root.getFirstChildElement();
while (row != null) {
- row.getStyle().setWidth(rowWidth, Unit.PX);
+ // IF there is a rounding error when summing the columns, we
+ // need to round the tr width up to ensure that columns fit and
+ // do not wrap
+ // E.g.122.95+123.25+103.75+209.25+83.52+88.57+263.45+131.21+126.85+113.13=1365.9299999999998
+ // For this we must set 1365.93 or the last column will wrap
+ row.getStyle().setWidth(WidgetUtil.roundSizeUp(rowWidth),
+ Unit.PX);
row = row.getNextSiblingElement();
}
}