diff options
-rwxr-xr-x | chrome/common/extensions/extension_action.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/chrome/common/extensions/extension_action.cc b/chrome/common/extensions/extension_action.cc index 088e24c..1f2538e 100755 --- a/chrome/common/extensions/extension_action.cc +++ b/chrome/common/extensions/extension_action.cc @@ -137,8 +137,9 @@ void ExtensionAction::PaintBadge(gfx::Canvas* canvas, rect.fTop = rect.fBottom - SkIntToScalar(kBadgeHeight); if (badge_width >= kCenterAlignThreshold) { rect.fLeft = SkIntToScalar( - SkScalarFloor(SkIntToScalar(bounds.width() / 2.0) - - SkIntToScalar(badge_width / 2.0))); + SkScalarFloor(SkIntToScalar(bounds.x()) + + SkIntToScalar(bounds.width() / 2.0) - + SkIntToScalar(badge_width / 2.0); rect.fRight = rect.fLeft + SkIntToScalar(badge_width); } else { rect.fRight = SkIntToScalar(bounds.right()); |