Fix Popup animations in RTL mode. We want to animate from the upper-right corner down to the lower-left corner (in LTR mode, the animation goes from the upper-left corner to the lower-right corner). Patch by: adil.allawi, rdayal Review by: jlabanca git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@2405 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/user/src/com/google/gwt/user/client/ui/PopupPanel.java b/user/src/com/google/gwt/user/client/ui/PopupPanel.java index 79361dc..ad1fe1c 100644 --- a/user/src/com/google/gwt/user/client/ui/PopupPanel.java +++ b/user/src/com/google/gwt/user/client/ui/PopupPanel.java
@@ -23,6 +23,7 @@ import com.google.gwt.user.client.Window; import com.google.gwt.user.client.animation.WidgetAnimation; import com.google.gwt.user.client.ui.impl.PopupImpl; +import com.google.gwt.i18n.client.LocaleInfo; /** * A panel that can "pop up" over other widgets. It overlays the browser's @@ -152,6 +153,10 @@ if (curPanel.animType == AnimationType.CENTER) { top = (offsetHeight - height) >> 1; left = (offsetWidth - width) >> 1; + } else if (curPanel.animType == AnimationType.ONE_WAY_CORNER) { + if (LocaleInfo.getCurrentLocale().isRTL()) { + left = offsetWidth - width; + } } right = left + width; bottom = top + height;