Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(738)

Issue 2063633002: Render Ash material design battery image icon without PNGs (Closed)

Created:
4 years, 6 months ago by tdanderson
Modified:
4 years, 6 months ago
CC:
chromium-reviews, kalyank, sadrul, oshima+watch_chromium.org, derat+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Render Ash material design battery image icon without PNGs Render the battery icon used in the Ash material design system tray using a vector icon instead of a PNG. The battery charge level is drawn at runtime, and battery badges (alert, lightning bolt, X, and unreliable charging) are drawn using separate vector icons. BUG=617298 TEST=PowerStatusTest.* Committed: https://crrev.com/7da397af40d827b9d8252001c3c944ed09f4e9ea Cr-Commit-Position: refs/heads/master@{#401378}

Patch Set 1 #

Total comments: 8

Patch Set 2 : for review #

Total comments: 28

Patch Set 3 : tests added #

Total comments: 16

Patch Set 4 : missing f after floating point values #

Patch Set 5 : more comments addressed #

Patch Set 6 : add battery percentage constant #

Unified diffs Side-by-side diffs Delta from patch set Stats (+543 lines, -59 lines) Patch
M ash/common/system/chromeos/power/power_status.h View 1 2 3 4 5 4 chunks +52 lines, -7 lines 0 comments Download
M ash/common/system/chromeos/power/power_status.cc View 1 2 3 4 5 5 chunks +154 lines, -12 lines 0 comments Download
M ash/common/system/chromeos/power/power_status_unittest.cc View 1 2 3 4 5 9 chunks +167 lines, -8 lines 0 comments Download
M ash/common/system/chromeos/power/power_status_view.cc View 1 2 3 4 2 chunks +9 lines, -2 lines 0 comments Download
M ash/common/system/chromeos/power/tray_power.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M ui/gfx/BUILD.gn View 1 1 chunk +10 lines, -0 lines 0 comments Download
A ui/gfx/vector_icons/system_tray_battery.icon View 1 chunk +22 lines, -0 lines 0 comments Download
A ui/gfx/vector_icons/system_tray_battery.1x.icon View 1 chunk +22 lines, -0 lines 0 comments Download
A + ui/gfx/vector_icons/system_tray_battery_alert.icon View 1 1 chunk +9 lines, -13 lines 0 comments Download
A + ui/gfx/vector_icons/system_tray_battery_alert.1x.icon View 1 1 chunk +11 lines, -9 lines 0 comments Download
A + ui/gfx/vector_icons/system_tray_battery_bolt.icon View 1 1 chunk +7 lines, -2 lines 0 comments Download
A + ui/gfx/vector_icons/system_tray_battery_bolt.1x.icon View 1 1 chunk +7 lines, -5 lines 0 comments Download
A ui/gfx/vector_icons/system_tray_battery_unreliable.icon View 1 2 3 1 chunk +16 lines, -0 lines 0 comments Download
A ui/gfx/vector_icons/system_tray_battery_unreliable.1x.icon View 1 1 chunk +16 lines, -0 lines 0 comments Download
A ui/gfx/vector_icons/system_tray_battery_x.icon View 1 1 chunk +20 lines, -0 lines 0 comments Download
A ui/gfx/vector_icons/system_tray_battery_x.1x.icon View 1 1 chunk +20 lines, -0 lines 0 comments Download

Messages

Total messages: 26 (9 generated)
tdanderson
Evan, here is a WIP to illustrate how I'd like to draw the MD battery ...
4 years, 6 months ago (2016-06-13 01:06:56 UTC) #2
Evan Stade
https://codereview.chromium.org/2063633002/diff/1/ash/system/chromeos/power/power_status.cc File ash/system/chromeos/power/power_status.cc (right): https://codereview.chromium.org/2063633002/diff/1/ash/system/chromeos/power/power_status.cc#newcode352 ash/system/chromeos/power/power_status.cc:352: const SkColor kFillColor = this is kind of confusing ...
4 years, 6 months ago (2016-06-13 17:37:20 UTC) #3
tdanderson
James and Evan, can you please take a look? Note that I still have to ...
4 years, 6 months ago (2016-06-20 23:06:53 UTC) #6
Evan Stade
https://codereview.chromium.org/2063633002/diff/1/ash/system/chromeos/power/power_status.cc File ash/system/chromeos/power/power_status.cc (right): https://codereview.chromium.org/2063633002/diff/1/ash/system/chromeos/power/power_status.cc#newcode352 ash/system/chromeos/power/power_status.cc:352: const SkColor kFillColor = On 2016/06/20 23:06:53, tdanderson wrote: ...
4 years, 6 months ago (2016-06-21 02:55:48 UTC) #7
James Cook
I'll take a look after you address Evan's comments and the compile failures. Feel free ...
4 years, 6 months ago (2016-06-21 16:13:00 UTC) #8
James Cook
er, test failures I mean.
4 years, 6 months ago (2016-06-21 16:13:29 UTC) #9
tdanderson
James and Evan, I have addressed the last round of comments and added tests. Can ...
4 years, 6 months ago (2016-06-21 22:42:29 UTC) #11
James Cook
https://codereview.chromium.org/2063633002/diff/20001/ash/common/system/chromeos/power/power_status.cc File ash/common/system/chromeos/power/power_status.cc (right): https://codereview.chromium.org/2063633002/diff/20001/ash/common/system/chromeos/power/power_status.cc#newcode132 ash/common/system/chromeos/power/power_status.cc:132: const int kBatteryImageHeightMD = 12; On 2016/06/21 22:42:28, tdanderson ...
4 years, 6 months ago (2016-06-21 23:19:00 UTC) #12
Evan Stade
https://codereview.chromium.org/2063633002/diff/20001/ash/common/system/chromeos/power/power_status.cc File ash/common/system/chromeos/power/power_status.cc (right): https://codereview.chromium.org/2063633002/diff/20001/ash/common/system/chromeos/power/power_status.cc#newcode132 ash/common/system/chromeos/power/power_status.cc:132: const int kBatteryImageHeightMD = 12; On 2016/06/21 22:42:28, tdanderson ...
4 years, 6 months ago (2016-06-21 23:25:42 UTC) #13
tdanderson
James and Evan, please take another look. https://codereview.chromium.org/2063633002/diff/20001/ash/common/system/chromeos/power/power_status.cc File ash/common/system/chromeos/power/power_status.cc (right): https://codereview.chromium.org/2063633002/diff/20001/ash/common/system/chromeos/power/power_status.cc#newcode132 ash/common/system/chromeos/power/power_status.cc:132: const int ...
4 years, 6 months ago (2016-06-22 15:25:01 UTC) #14
James Cook
LGTM
4 years, 6 months ago (2016-06-22 15:48:23 UTC) #15
Evan Stade
lgtm modulo ! badge issue https://codereview.chromium.org/2063633002/diff/20001/ash/common/system/chromeos/power/power_status.cc File ash/common/system/chromeos/power/power_status.cc (right): https://codereview.chromium.org/2063633002/diff/20001/ash/common/system/chromeos/power/power_status.cc#newcode340 ash/common/system/chromeos/power/power_status.cc:340: if (!fill_state && info->icon_badge ...
4 years, 6 months ago (2016-06-22 16:49:23 UTC) #16
Daniel Erat
https://codereview.chromium.org/2063633002/diff/20001/ash/common/system/chromeos/power/power_status.cc File ash/common/system/chromeos/power/power_status.cc (right): https://codereview.chromium.org/2063633002/diff/20001/ash/common/system/chromeos/power/power_status.cc#newcode340 ash/common/system/chromeos/power/power_status.cc:340: if (!fill_state && info->icon_badge == ICON_BADGE_NONE) On 2016/06/22 16:49:23, ...
4 years, 6 months ago (2016-06-22 17:22:44 UTC) #18
tdanderson
https://codereview.chromium.org/2063633002/diff/20001/ash/common/system/chromeos/power/power_status.cc File ash/common/system/chromeos/power/power_status.cc (right): https://codereview.chromium.org/2063633002/diff/20001/ash/common/system/chromeos/power/power_status.cc#newcode340 ash/common/system/chromeos/power/power_status.cc:340: if (!fill_state && info->icon_badge == ICON_BADGE_NONE) On 2016/06/22 17:22:43, ...
4 years, 6 months ago (2016-06-22 17:27:28 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2063633002/100001
4 years, 6 months ago (2016-06-22 17:28:10 UTC) #22
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 6 months ago (2016-06-22 19:06:52 UTC) #24
commit-bot: I haz the power
4 years, 6 months ago (2016-06-22 19:09:51 UTC) #26
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/7da397af40d827b9d8252001c3c944ed09f4e9ea
Cr-Commit-Position: refs/heads/master@{#401378}

Powered by Google App Engine
This is Rietveld 408576698