summaryrefslogtreecommitdiffstats
path: root/views/widget
diff options
context:
space:
mode:
authorjohnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-14 20:46:52 +0000
committerjohnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-14 20:46:52 +0000
commit4245ae4e0766915f2e5ef8f1ba411089bc261ba2 (patch)
tree5b103ce72ad7a5bc03ff742e91a057efd8bd84e7 /views/widget
parentd49099c62c66e972dd4dee81aa0d7eb47096dc1c (diff)
downloadchromium_src-4245ae4e0766915f2e5ef8f1ba411089bc261ba2.zip
chromium_src-4245ae4e0766915f2e5ef8f1ba411089bc261ba2.tar.gz
chromium_src-4245ae4e0766915f2e5ef8f1ba411089bc261ba2.tar.bz2
Notification balloons don't want the WS_EX_LAYOUTRTL style flag, since the directionality of the content is specified already inside the HTML.
BUG=46170 TEST=create a notification while using an RTL language for Chrome UI. Review URL: http://codereview.chromium.org/2794001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49723 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/widget')
-rw-r--r--views/widget/widget.h12
-rw-r--r--views/widget/widget_gtk.cc3
-rw-r--r--views/widget/widget_win.cc7
3 files changed, 18 insertions, 4 deletions
diff --git a/views/widget/widget.h b/views/widget/widget.h
index cf893ee..7443bcb 100644
--- a/views/widget/widget.h
+++ b/views/widget/widget.h
@@ -64,10 +64,20 @@ class Widget {
NotDeleteOnDestroy
};
+ enum MirroringParam {
+ MirrorOriginInRTL,
+ DontMirrorOriginInRTL
+ };
+
// Creates a transient popup widget specific to the current platform.
+ // If |mirror_in_rtl| is set to MirrorOriginInRTL, the contents of the
+ // popup will be mirrored if the current locale is RTL. You should use
+ // DontMirrorOriginInRTL if you are aleady handling the RTL layout within
+ // the widget.
static Widget* CreatePopupWidget(TransparencyParam transparent,
EventsParam accept_events,
- DeleteParam delete_on_destroy);
+ DeleteParam delete_on_destroy,
+ MirroringParam mirror_in_rtl);
// Returns the root view for |native_window|. If |native_window| does not have
// a rootview, this recurses through all of |native_window|'s children until
diff --git a/views/widget/widget_gtk.cc b/views/widget/widget_gtk.cc
index 7bc8d03..f38267b 100644
--- a/views/widget/widget_gtk.cc
+++ b/views/widget/widget_gtk.cc
@@ -1427,7 +1427,8 @@ void WidgetGtk::DrawTransparentBackground(GtkWidget* widget,
// static
Widget* Widget::CreatePopupWidget(TransparencyParam transparent,
EventsParam accept_events,
- DeleteParam delete_on_destroy) {
+ DeleteParam delete_on_destroy,
+ MirroringParam mirror_in_rtl) {
WidgetGtk* popup = new WidgetGtk(WidgetGtk::TYPE_POPUP);
popup->set_delete_on_destroy(delete_on_destroy == DeleteOnDestroy);
if (transparent == Transparent)
diff --git a/views/widget/widget_win.cc b/views/widget/widget_win.cc
index 72431b0..ef6612a 100644
--- a/views/widget/widget_win.cc
+++ b/views/widget/widget_win.cc
@@ -1257,9 +1257,12 @@ void WidgetWin::PostProcessActivateMessage(WidgetWin* widget,
// static
Widget* Widget::CreatePopupWidget(TransparencyParam transparent,
EventsParam accept_events,
- DeleteParam delete_on_destroy) {
+ DeleteParam delete_on_destroy,
+ MirroringParam mirror_in_rtl) {
WidgetWin* popup = new WidgetWin;
- DWORD ex_style = WS_EX_TOOLWINDOW | l10n_util::GetExtendedTooltipStyles();
+ DWORD ex_style = WS_EX_TOOLWINDOW;
+ if (mirror_in_rtl == MirrorOriginInRTL)
+ ex_style |= l10n_util::GetExtendedTooltipStyles();
if (transparent == Transparent)
ex_style |= WS_EX_LAYERED;
if (accept_events != AcceptEvents)