Incorrect width of GroupTable header #PL-5933

This commit is contained in:
Gleb Gorelov 2015-09-16 10:04:31 +00:00
parent 8c921a1c3d
commit fe7722adb4

View File

@ -538,12 +538,12 @@ public class CubaGroupTableWidget extends CubaScrollTableWidget {
int wrapperWidth; int wrapperWidth;
ComputedStyle style = new ComputedStyle(td); ComputedStyle style = new ComputedStyle(td);
if (style.getPaddingWidth() > 1.0) { if (style.getPaddingWidth() > 1.0) {
// this is applied for havana theme, because it has vertical paddings // this is applied for havana theme, because it has vertical padding
// for cell-container and width of TD element must be less, then whole row // for cell-container and width of TD element must be less, then whole row
String tdWidthPx = td.getStyle().getWidth().replace("px", ""); String tdWidthPx = td.getStyle().getWidth().replace("px", "");
wrapperWidth = Integer.parseInt(tdWidthPx); wrapperWidth = Integer.parseInt(tdWidthPx);
} else { } else {
// this is applied for halo theme, because it hasn't vertical paddings // this is applied for halo theme, because it hasn't vertical padding
// for cell-container and width of TD element must be equal to whole row - 1px // for cell-container and width of TD element must be equal to whole row - 1px
// 1px is the padding-left of :first-child // 1px is the padding-left of :first-child
wrapperWidth = totalSpannedWidth - 1; wrapperWidth = totalSpannedWidth - 1;