summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/find_bar_view.cc
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-10 23:15:21 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-10 23:15:21 +0000
commitc2f4bdb7deec2fe9aaa3583ff2066e634001be8f (patch)
treee1ba425190c39667910ff1c864bdee6afc4bd191 /chrome/browser/views/find_bar_view.cc
parent6e76d8d105739f3b40274dd0247a75ea44e46a89 (diff)
downloadchromium_src-c2f4bdb7deec2fe9aaa3583ff2066e634001be8f.zip
chromium_src-c2f4bdb7deec2fe9aaa3583ff2066e634001be8f.tar.gz
chromium_src-c2f4bdb7deec2fe9aaa3583ff2066e634001be8f.tar.bz2
Eliminate View::UILayoutIsRightToLeft() to standardize on base::i18n::IsRTL(). Was only needed for EnableUIMirroringForRTLLanguages(), which was only used by Views::Label, which already had this capability via set_rtl_alignment_mode().
BUG=none TEST=none Review URL: http://codereview.chromium.org/1991002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46869 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/find_bar_view.cc')
-rw-r--r--chrome/browser/views/find_bar_view.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/chrome/browser/views/find_bar_view.cc b/chrome/browser/views/find_bar_view.cc
index 7e15345..c1f063e 100644
--- a/chrome/browser/views/find_bar_view.cc
+++ b/chrome/browser/views/find_bar_view.cc
@@ -156,10 +156,8 @@ FindBarView::FindBarView(FindBarHost* host)
// Background images for the Find edit box.
kBackground = rb.GetBitmapNamed(IDR_FIND_BOX_BACKGROUND);
- if (UILayoutIsRightToLeft())
- kBackground_left = rb.GetBitmapNamed(IDR_FIND_BOX_BACKGROUND_LEFT_RTL);
- else
- kBackground_left = rb.GetBitmapNamed(IDR_FIND_BOX_BACKGROUND_LEFT);
+ kBackground_left = rb.GetBitmapNamed(base::i18n::IsRTL() ?
+ IDR_FIND_BOX_BACKGROUND_LEFT_RTL : IDR_FIND_BOX_BACKGROUND_LEFT);
}
}
@@ -256,7 +254,7 @@ void FindBarView::Paint(gfx::Canvas* canvas) {
gfx::Rect back_button_rect;
int x = 0; // x coordinate of the curved edge background image.
int w = 0; // width of the background image for the text field.
- if (UILayoutIsRightToLeft()) {
+ if (base::i18n::IsRTL()) {
find_text_rect = find_text_->GetBounds(APPLY_MIRRORING_TRANSFORMATION);
back_button_rect =
find_previous_button_->GetBounds(APPLY_MIRRORING_TRANSFORMATION);
@@ -281,7 +279,7 @@ void FindBarView::Paint(gfx::Canvas* canvas) {
// find_text_ edit box and the match_count_text_ label).
int background_height = kBackground->height();
canvas->TileImageInt(*kBackground,
- UILayoutIsRightToLeft() ?
+ base::i18n::IsRTL() ?
back_button_rect.right() : find_text_rect.x(),
back_button_rect.y(),
w,