Browse Source

fixes #1225

svn changeset:3933/svn branch:trunk
tags/6.7.0.beta1
Matti Tahvonen 16 years ago
parent
commit
44bd75c1ff
1 changed files with 38 additions and 5 deletions
  1. 38
    5
      src/com/itmill/toolkit/terminal/gwt/client/ui/ISplitPanel.java

+ 38
- 5
src/com/itmill/toolkit/terminal/gwt/client/ui/ISplitPanel.java View File

@@ -4,7 +4,9 @@

package com.itmill.toolkit.terminal.gwt.client.ui;

import com.google.gwt.user.client.Command;
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.DeferredCommand;
import com.google.gwt.user.client.Element;
import com.google.gwt.user.client.Event;
import com.google.gwt.user.client.ui.ComplexPanel;
@@ -94,7 +96,17 @@ public class ISplitPanel extends ComplexPanel implements Paintable,

DOM.setStyleAttribute(firstContainer, "overflow", "auto");
DOM.setStyleAttribute(secondContainer, "overflow", "auto");

if (Util.isIE7()) {
/*
* Part I of IE7 weirdness hack, will be set to auto in layout phase
*
* With IE7 one will sometimes get scrollbars with overflow auto
* even though there is nothing to scroll (content fits into area).
*
*/
DOM.setStyleAttribute(firstContainer, "overflow", "hidden");
DOM.setStyleAttribute(secondContainer, "overflow", "hidden");
}
}

private void setOrientation(int orientation) {
@@ -148,6 +160,15 @@ public class ISplitPanel extends ComplexPanel implements Paintable,
}
newFirstChild.updateFromUIDL(uidl.getChildUIDL(0), client);
newSecondChild.updateFromUIDL(uidl.getChildUIDL(1), client);

if (Util.isIE7()) {
// Part III of IE7 hack
DeferredCommand.addCommand(new Command() {
public void execute() {
iLayout();
}
});
}
}

private void setSplitPosition(String pos) {
@@ -225,14 +246,26 @@ public class ISplitPanel extends ComplexPanel implements Paintable,
secondContainerHeight + "px");
DOM.setStyleAttribute(secondContainer, "top",
(pixelPosition + getSplitterSize()) + "px");
ApplicationConnection.getConsole().log(
"secondContainerHeight:" + secondContainerHeight);
break;
default:
ApplicationConnection.getConsole().log("???");
}

break;
if (Util.isIE7()) {
// Part I of IE7 weirdness hack, will be set to auto in layout phase
DOM.setStyleAttribute(firstContainer, "overflow", "hidden");
DOM.setStyleAttribute(secondContainer, "overflow", "hidden");
Util.runDescendentsLayout(this);
DeferredCommand.addCommand(new Command() {
public void execute() {
DOM.setStyleAttribute(firstContainer, "overflow", "auto");
DOM.setStyleAttribute(secondContainer, "overflow", "auto");
}
});
} else {
Util.runDescendentsLayout(this);
}

Util.runDescendentsLayout(this);
}

private void setFirstWidget(Widget w) {

Loading…
Cancel
Save