aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonatan Kronqvist <jonatan.kronqvist@itmill.com>2010-11-29 11:16:11 +0000
committerJonatan Kronqvist <jonatan.kronqvist@itmill.com>2010-11-29 11:16:11 +0000
commitb8b64499aad6c9da9a369d3e66d7823b5847073c (patch)
treeab8e23aac554bf45aa252176ee863809fad36c67
parent90cd6658267df8971fe136bd3086fa966c2133b4 (diff)
downloadvaadin-framework-b8b64499aad6c9da9a369d3e66d7823b5847073c.tar.gz
vaadin-framework-b8b64499aad6c9da9a369d3e66d7823b5847073c.zip
Fixed a couple of width calculation bugs relating to #5066
svn changeset:16208/svn branch:6.5
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java23
1 files changed, 17 insertions, 6 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java b/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java
index 5bede15597..bc9e9642ca 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java
@@ -1810,10 +1810,17 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler,
* indicator by subtracting the styled margin and resizer width
* from the width of the caption container.
*/
- int captionContainerWidth = w - sortIndicator.getOffsetWidth()
- - colResizeWidget.getOffsetWidth();
- captionContainer.getStyle().setPropertyPx("width",
- captionContainerWidth);
+ if (BrowserInfo.get().isIE6()
+ || td.getClassName().contains("-asc")
+ || td.getClassName().contains("-desc")) {
+ int captionContainerWidth = w
+ - sortIndicator.getOffsetWidth()
+ - colResizeWidget.getOffsetWidth();
+ captionContainer.getStyle().setPropertyPx("width",
+ captionContainerWidth);
+ } else {
+ captionContainer.getStyle().setPropertyPx("width", w);
+ }
/*
* if we already have tBody, set the header width properly, if
@@ -2143,8 +2150,12 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler,
// value (greater of header and data
// cols)
- final int hw = ((Element) getElement().getLastChild())
- .getOffsetWidth() + getCellExtraWidth();
+ int hw = captionContainer.getOffsetWidth()
+ + getCellExtraWidth();
+ if (BrowserInfo.get().isGecko()
+ || BrowserInfo.get().isIE7()) {
+ hw += sortIndicator.getOffsetWidth();
+ }
if (columnIndex < 0) {
columnIndex = 0;
for (Iterator<Widget> it = tHead.iterator(); it