Commit ce20f0d8 authored by jennyz@chromium.org's avatar jennyz@chromium.org

Adjust battery image assets to better align in ash tray:

Move the battery icon 1 pixel lower.
Center the battery icon and remove the special code adjustment for clipping non-centered battery icon.
Use new battery icons that aligns with battery percentage better.

BUG=172701
TBR=sky

Review URL: https://codereview.chromium.org/12259007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@182255 0039d316-1c4b-4281-b951-d872f2087c98
parent 85c2a3d4
...@@ -167,12 +167,10 @@ gfx::ImageSkia TrayPower::GetBatteryImage(int image_index, IconSet icon_set) { ...@@ -167,12 +167,10 @@ gfx::ImageSkia TrayPower::GetBatteryImage(int image_index, IconSet icon_set) {
icon_set == ICON_DARK ? icon_set == ICON_DARK ?
IDR_AURA_UBER_TRAY_POWER_SMALL_DARK : IDR_AURA_UBER_TRAY_POWER_SMALL); IDR_AURA_UBER_TRAY_POWER_SMALL_DARK : IDR_AURA_UBER_TRAY_POWER_SMALL);
// TODO(mbolohan): Remove the 2px offset when the assets are centered. See
// crbug.com/119832.
gfx::Rect region( gfx::Rect region(
((image_index & 0x1) ? kBatteryImageWidth : 0) + 2, (image_index & 0x1) ? kBatteryImageWidth : 0,
(image_index >> 1) * kBatteryImageHeight, (image_index >> 1) * kBatteryImageHeight,
kBatteryImageWidth - 2, kBatteryImageHeight); kBatteryImageWidth, kBatteryImageHeight);
return gfx::ImageSkiaOperations::ExtractSubset(*all.ToImageSkia(), region); return gfx::ImageSkiaOperations::ExtractSubset(*all.ToImageSkia(), region);
} }
......
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