diff options
author | jonross <jonross@chromium.org> | 2015-04-23 17:20:59 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-24 00:21:15 +0000 |
commit | eff6e5b986032993b16e4867eab23ecca867b09f (patch) | |
tree | efe6fedb36b615ffa2a8bd93e0381cb2a3d6a502 /ash | |
parent | 9166080685403f1360af8e7578e3e102e513e78b (diff) | |
download | chromium_src-eff6e5b986032993b16e4867eab23ecca867b09f.zip chromium_src-eff6e5b986032993b16e4867eab23ecca867b09f.tar.gz chromium_src-eff6e5b986032993b16e4867eab23ecca867b09f.tar.bz2 |
Stop flipping Help Icon in Hebrew Locale
Update the help button of the system tray to no longer flip while in the Hebrew
locale.
The asset used is a question mark, which is flipped in most RTL locales. Hebrew
is the exception, which uses the same question mark as LTR locales.
TEST=Manual testing on device
BUG=475237
Review URL: https://codereview.chromium.org/1072423004
Cr-Commit-Position: refs/heads/master@{#326699}
Diffstat (limited to 'ash')
-rw-r--r-- | ash/system/date/date_default_view.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ash/system/date/date_default_view.cc b/ash/system/date/date_default_view.cc index ca64a1e..35b4d36 100644 --- a/ash/system/date/date_default_view.cc +++ b/ash/system/date/date_default_view.cc @@ -13,6 +13,7 @@ #include "ash/system/tray/tray_constants.h" #include "ash/system/tray/tray_popup_header_button.h" #include "ash/wm/lock_state_controller.h" +#include "base/i18n/rtl.h" #include "grit/ash_resources.h" #include "grit/ash_strings.h" #include "ui/base/l10n/l10n_util.h" @@ -23,6 +24,10 @@ namespace { +// The ISO-639 code for the Hebrew locale. The help icon asset is a '?' which is +// not mirrored in this locale. +const char kHebrewLocale[] = "he"; + const int kPaddingVertical = 19; } // namespace @@ -58,6 +63,13 @@ DateDefaultView::DateDefaultView(ash::user::LoginStatus login) this, IDR_AURA_UBER_TRAY_HELP, IDR_AURA_UBER_TRAY_HELP, IDR_AURA_UBER_TRAY_HELP_HOVER, IDR_AURA_UBER_TRAY_HELP_HOVER, IDS_ASH_STATUS_TRAY_HELP); + if (base::i18n::IsRTL() && + base::i18n::GetConfiguredLocale() == kHebrewLocale) { + // The asset for the help button is a question mark '?'. Normally this asset + // is flipped in RTL locales, however Hebrew uses the LTR '?'. So the + // flipping must be disabled. (crbug.com/475237) + help_button_->EnableCanvasFlippingForRTLUI(false); + } help_button_->SetTooltipText( l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_HELP)); view->AddButton(help_button_); |