summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views
diff options
context:
space:
mode:
authoridana@chromium.org <idana@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-10 23:53:18 +0000
committeridana@chromium.org <idana@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-10 23:53:18 +0000
commit5bbb746bf65898d6a77fc2337c4265f4774349d8 (patch)
tree0c8a82a73f688dde8183f95ea498a872d697165b /chrome/browser/views
parent3ea496ce908dd469c5ad925bc7e5ad64a6292857 (diff)
downloadchromium_src-5bbb746bf65898d6a77fc2337c4265f4774349d8.zip
chromium_src-5bbb746bf65898d6a77fc2337c4265f4774349d8.tar.gz
chromium_src-5bbb746bf65898d6a77fc2337c4265f4774349d8.tar.bz2
Fixed a label alignment issue in ConfirmMessageBoxDialog.
There is no need to manually detect the text directionlity at run time. Setting the label's alignment to views::Label::ALIGN_LEFT is sufficient because the mirroring subsystem will flip it automatically if the locale is RTL. BUG=26378 TEST=Run chrome with --lang=he, enable sync and then disable through the options dialog. Text in dialog box should be right aligned. Review URL: http://codereview.chromium.org/390005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31616 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views')
-rw-r--r--chrome/browser/views/confirm_message_box_dialog.cc15
1 files changed, 2 insertions, 13 deletions
diff --git a/chrome/browser/views/confirm_message_box_dialog.cc b/chrome/browser/views/confirm_message_box_dialog.cc
index 6182bd8..3f3a1a3 100644
--- a/chrome/browser/views/confirm_message_box_dialog.cc
+++ b/chrome/browser/views/confirm_message_box_dialog.cc
@@ -59,18 +59,7 @@ ConfirmMessageBoxDialog::ConfirmMessageBoxDialog(
IDS_CONFIRM_MESSAGEBOX_NO_BUTTON_LABEL)) {
message_label_ = new views::Label(message_text);
message_label_->SetMultiLine(true);
- l10n_util::TextDirection direction =
- l10n_util::GetFirstStrongCharacterDirection(message_label_->GetText());
- views::Label::Alignment alignment;
- if (direction == l10n_util::RIGHT_TO_LEFT)
- alignment = views::Label::ALIGN_RIGHT;
- else
- alignment = views::Label::ALIGN_LEFT;
- // In addition, we should set the RTL alignment mode as
- // AUTO_DETECT_ALIGNMENT so that the alignment will not be flipped around
- // in RTL locales.
- message_label_->SetRTLAlignmentMode(views::Label::AUTO_DETECT_ALIGNMENT);
- message_label_->SetHorizontalAlignment(alignment);
+ message_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
AddChildView(message_label_);
}
@@ -112,4 +101,4 @@ void ConfirmMessageBoxDialog::Layout() {
gfx::Size ConfirmMessageBoxDialog::GetPreferredSize() {
return preferred_size_;
-} \ No newline at end of file
+}