Reviewers: unnurg,

Description:
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.


Please review this at http://gwt-code-reviews.appspot.com/989801/show

Affected files:
  M user/src/com/google/gwt/logging/client/LoggingPopup.java


Index: user/src/com/google/gwt/logging/client/LoggingPopup.java
===================================================================
--- user/src/com/google/gwt/logging/client/LoggingPopup.java    (revision 9038)
+++ user/src/com/google/gwt/logging/client/LoggingPopup.java    (working copy)
@@ -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);
   }
-
 }


--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to