Chromium Code Reviews| Index: chrome/browser/ui/views/tabs/base_tab.cc |
| =================================================================== |
| --- chrome/browser/ui/views/tabs/base_tab.cc (revision 144784) |
| +++ chrome/browser/ui/views/tabs/base_tab.cc (working copy) |
| @@ -547,9 +547,15 @@ |
| canvas->DrawFadeTruncatingString(title, gfx::Canvas::TruncateFadeTail, 0, |
| *font_, title_color, title_bounds); |
| #else |
| + int flags = gfx::Canvas::TEXT_ALIGN_LEFT; |
| + if (base::i18n::IsRTL() && |
| + base::i18n::GetFirstStrongCharacterDirection(title) != |
| + base::i18n::LEFT_TO_RIGHT) { |
| + flags = gfx::Canvas::TEXT_ALIGN_RIGHT; |
| + } |
|
xji
2012/06/29 18:11:24
Since RenderText has both directionality and horiz
|
| canvas->DrawStringInt(title, *font_, title_color, |
| title_bounds.x(), title_bounds.y(), |
| - title_bounds.width(), title_bounds.height()); |
| + title_bounds.width(), title_bounds.height(), flags); |
| #endif |
| } |