diff options
author | Artur Signell <artur@vaadin.com> | 2015-02-06 01:35:31 +0200 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2015-09-24 09:24:05 +0000 |
commit | da8b43ed411cdafe2ddefcb6078f49ab59c5958e (patch) | |
tree | 8952844fe1b9c728126998a274c93b673acd83f7 /client | |
parent | ca3c460cbd6edb801f7919d046a3323f5f8babf1 (diff) | |
download | vaadin-framework-da8b43ed411cdafe2ddefcb6078f49ab59c5958e.tar.gz vaadin-framework-da8b43ed411cdafe2ddefcb6078f49ab59c5958e.zip |
Correctly round tr width in Escalator (#18820)
* screenshot based tests for all themes for various features in Grid
Change-Id: Id44f319b517fdfa419b70d30a9f8d4bd5e82fa63
Diffstat (limited to 'client')
-rw-r--r-- | client/src/com/vaadin/client/widgets/Escalator.java | 8 |
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 761edf1f11..9b9616f474 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(); } } |