summaryrefslogtreecommitdiffstats
path: root/src/com/itmill/toolkit
diff options
context:
space:
mode:
authorMatti Tahvonen <matti.tahvonen@itmill.com>2009-04-24 09:04:32 +0000
committerMatti Tahvonen <matti.tahvonen@itmill.com>2009-04-24 09:04:32 +0000
commit321befdac2ac230afeba0815d1848b10b5bc9828 (patch)
treec96ffba8de0b378d12c152b981523709e0027719 /src/com/itmill/toolkit
parent3c28856b2f675b5306b48d4efafae623163f7120 (diff)
downloadvaadin-framework-321befdac2ac230afeba0815d1848b10b5bc9828.tar.gz
vaadin-framework-321befdac2ac230afeba0815d1848b10b5bc9828.zip
scrolltable theme refactoring: cleaning, fixing regressions
svn changeset:7523/svn branch:6.0
Diffstat (limited to 'src/com/itmill/toolkit')
-rw-r--r--src/com/itmill/toolkit/terminal/gwt/client/ui/IScrollTable.java25
1 files changed, 12 insertions, 13 deletions
diff --git a/src/com/itmill/toolkit/terminal/gwt/client/ui/IScrollTable.java b/src/com/itmill/toolkit/terminal/gwt/client/ui/IScrollTable.java
index 2f88424374..70bcc618a5 100644
--- a/src/com/itmill/toolkit/terminal/gwt/client/ui/IScrollTable.java
+++ b/src/com/itmill/toolkit/terminal/gwt/client/ui/IScrollTable.java
@@ -15,6 +15,7 @@ import java.util.Vector;
import com.google.gwt.dom.client.Document;
import com.google.gwt.dom.client.NodeList;
+import com.google.gwt.dom.client.Style;
import com.google.gwt.dom.client.TableCellElement;
import com.google.gwt.dom.client.TableRowElement;
import com.google.gwt.dom.client.TableSectionElement;
@@ -603,8 +604,10 @@ public class IScrollTable extends FlowPanel implements Table, ScrollListener {
}
int availW = tBody.getAvailableWidth();
- // Hey IE, are you really sure about this?
- availW = tBody.getAvailableWidth();
+ if (BrowserInfo.get().isIE()) {
+ // Hey IE, are you really sure about this?
+ availW = tBody.getAvailableWidth();
+ }
availW -= tBody.getCellExtraWidth() * visibleColOrder.length;
if (willHaveScrollbarz) {
@@ -689,6 +692,7 @@ public class IScrollTable extends FlowPanel implements Table, ScrollListener {
*/
int bodyHeight = tBody.getTableHeight();
bodyContainer.setHeight(bodyHeight + "px");
+ Util.runWebkitOverflowAutoFix(bodyContainer.getElement());
} else {
int bodyHeight = (tBody.getRowHeight(true) * pageLength);
bodyContainer.setHeight(bodyHeight + "px");
@@ -726,16 +730,6 @@ public class IScrollTable extends FlowPanel implements Table, ScrollListener {
initializedAndAttached = true;
}
- private int getScrollbarWidth() {
- if (BrowserInfo.get().isIE6()) {
- return Util.measureHorizontalBorder(bodyContainer.getElement());
- }
-
- return bodyContainer.getOffsetWidth()
- - DOM.getElementPropertyInt(bodyContainer.getElement(),
- "clientWidth");
- }
-
/**
* This method has logic which rows needs to be requested from server when
* user scrolls
@@ -1844,7 +1838,12 @@ public class IScrollTable extends FlowPanel implements Table, ScrollListener {
}
public int getAvailableWidth() {
- return preSpacer.getOffsetWidth();
+ Style style = bodyContainer.getElement().getStyle();
+ style.setProperty("overflow", "hidden");
+ int w = bodyContainer.getElement().getPropertyInt("clientWidth");
+ style.setProperty("overflow", "auto");
+ return w;
+ // return preSpacer.getOffsetWidth();
}
public void renderInitialRows(UIDL rowData, int firstIndex, int rows) {