Chromium Code Reviews| Index: chrome/browser/ui/views/profiles/profile_chooser_view.cc |
| diff --git a/chrome/browser/ui/views/profiles/profile_chooser_view.cc b/chrome/browser/ui/views/profiles/profile_chooser_view.cc |
| index 0153322ed673a2a0158c123ed12994b07eb19040..ef5f0818928568d5741cfde9e28c49ffecb9b873 100644 |
| --- a/chrome/browser/ui/views/profiles/profile_chooser_view.cc |
| +++ b/chrome/browser/ui/views/profiles/profile_chooser_view.cc |
| @@ -4,6 +4,7 @@ |
| #include "chrome/browser/ui/views/profiles/profile_chooser_view.h" |
| +#include "base/i18n/rtl.h" |
| #include "base/macros.h" |
| #include "base/metrics/user_metrics.h" |
| #include "base/strings/utf_string_conversions.h" |
| @@ -373,8 +374,11 @@ class EditableProfilePhoto : public views::LabelButton { |
| } |
| // Calculate the circular mask that will be used to display the photo. |
| + // For RTL layouts, right-align the circular mask because profile badge can |
| + // appear on the LHS. |
| circular_mask_.addCircle( |
| - SkIntToScalar(icon_image_side() / 2), |
| + SkIntToScalar(icon_image_side() / 2) + |
| + (base::i18n::IsRTL() ? badge_spacing() : 0), |
|
sky
2016/08/26 19:18:27
In general we use the various GetMirrored* functio
|
| SkIntToScalar(icon_image_side() / 2) + badge_spacing(), |
| SkIntToScalar(icon_image_side() / 2)); |
| @@ -428,6 +432,9 @@ class EditableProfilePhoto : public views::LabelButton { |
| badge_offset + (switches::IsMaterialDesignUserMenu() |
| ? views::kRelatedControlSmallVerticalSpacing |
| : 0)); |
| + // For RTL layouts, left-align the profile badge. |
|
sky
2016/08/26 19:18:27
Similar comment here. Generally you calculate the
|
| + if (base::i18n::IsRTL()) |
| + badge_offset_vector.set_x(0); |
| gfx::Point center_point = bounds.CenterPoint() + badge_offset_vector; |
| // Paint the circular background. |