Setting the background color of LoggingPopup using Style so it works correctly on IE. Also scrolling the log to the bottom when log items are added.
Review at http://gwt-code-reviews.appspot.com/989801
Review by: unnurg@google.com
git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@9048 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/user/src/com/google/gwt/logging/client/LoggingPopup.java b/user/src/com/google/gwt/logging/client/LoggingPopup.java
index 0ddc1d3..1bb817c 100644
--- a/user/src/com/google/gwt/logging/client/LoggingPopup.java
+++ b/user/src/com/google/gwt/logging/client/LoggingPopup.java
@@ -138,7 +138,7 @@
super(false, false);
VerticalPanel mainPanel = new VerticalPanel();
mainPanel.setBorderWidth(1);
- mainPanel.getElement().setAttribute("style", "background-color:white");
+ mainPanel.getElement().getStyle().setBackgroundColor("white");
final HTML titleBar = new HTML("<center><b>Logging</b></center>");
mainPanel.add(titleBar);
@@ -184,12 +184,12 @@
@Override
public void add(Widget w) {
logArea.add(w);
+ scrollPanel.setScrollPosition(scrollPanel.getElement().getScrollHeight());
}
@Override
public void setWidget(Widget w) {
logArea.clear();
- logArea.add(w);
+ add(w);
}
-
}