In the Showcase, Source code and styles will now be in ltr and left aligned, even if the page is in rtl mode. This patch is TBR.
Patch by: jlabanca
git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@2379 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/ContentWidget.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/ContentWidget.java
index d04b3b8..3fff25b 100644
--- a/samples/showcase/src/com/google/gwt/sample/showcase/client/ContentWidget.java
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/ContentWidget.java
@@ -16,6 +16,8 @@
package com.google.gwt.sample.showcase.client;
import com.google.gwt.i18n.client.Constants;
+import com.google.gwt.i18n.client.HasDirection;
+import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.HTTPRequest;
import com.google.gwt.user.client.ResponseTextHandler;
import com.google.gwt.user.client.ui.Composite;
@@ -298,6 +300,8 @@
if (loadingImage == null) {
loadingImage = new Image("images/loading.gif");
}
+ target.setDirection(HasDirection.Direction.LTR);
+ DOM.setStyleAttribute(target.getElement(), "textAlign", "left");
target.setHTML(" " + loadingImage.toString());
// Request the contents of the file