Commit 1f828ff0 authored by Ahmed Mehfooz's avatar Ahmed Mehfooz Committed by Commit Bot

Fix Network icon badge padding.

Bug: 1111484
Change-Id: I05a1629833f26b03092d61b0db419e26dcbb4345
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2331516
Commit-Queue: Ahmed Mehfooz <amehfooz@chromium.org>
Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Reviewed-by: default avatarTim Song <tengs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#794711}
parent 7dd9b79a
......@@ -76,7 +76,8 @@ void NetworkIconImageSource::Draw(gfx::Canvas* canvas) {
}
if (badges_.bottom_right.icon) {
const int badge_size =
gfx::GetDefaultSizeOfVectorIcon(*badges_.bottom_right.icon);
gfx::GetDefaultSizeOfVectorIcon(*badges_.bottom_right.icon) -
kIconStrokeWidth;
paint_badge(badges_.bottom_right, width - badge_size, height - badge_size);
}
}
......
......@@ -135,9 +135,6 @@ const double kConnectingImageAlpha = 0.5;
// Number of discrete images to use for alpha fade animation
const int kNumFadeImages = 10;
// Padding to accommodate for space required by the badge.
const int kIconBadgePadding = 4;
bool IsTrayIcon(IconType icon_type) {
return icon_type == ICON_TYPE_TRAY_REGULAR ||
icon_type == ICON_TYPE_TRAY_OOBE;
......@@ -149,10 +146,8 @@ bool IconTypeHasVPNBadge(IconType icon_type) {
gfx::ImageSkia CreateNetworkIconImage(const gfx::ImageSkia& icon,
const Badges& badges) {
gfx::Size icon_size(icon.size().width() + kIconBadgePadding,
icon.size().height() + kIconBadgePadding);
return gfx::CanvasImageSource::MakeImageSkia<NetworkIconImageSource>(
icon_size, icon, badges);
icon.size(), icon, badges);
}
//------------------------------------------------------------------------------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment