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

Issue 1421973005: Follow Material spec for icons when adding web apps to home screen. (Closed)

Created:
5 years, 1 month ago by newt (away)
Modified:
5 years, 1 month ago
CC:
mlamouri (slow - plz ping), chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Follow Material spec for icons when adding web apps to home screen. This makes a few visual adjustments to the icons that are added to the home screen via "Add to home screen": - Icons aren't cropped. Previously icons were cropped by 1px, which caused circular icons to look broken. - We now add padding around the icon in accordance with the Material spec for icons [1]. We add padding such that the entire icon width with padding is 192 units, while the icon width without padding is 176 units. - To minimize scaling artifacts, icons aren't resized to getLauncherLargeIconSize(). getLauncherLargeIconSize() is just a guess at the launcher icon size, and is often wrong -- the launcher can shows icons at any size it pleases. Instead of resizing the icon to the supposed launcher size and then having the launcher resize the icon again, we leave the icon at its original size and let the launcher do a single rescaling. Unless the icon is much too big; then we do scale it down. [1] The Material spec for icons: https://www.google.com/design/spec/style/icons.html#icons-product-icons BUG=530329 Committed: https://crrev.com/a584b9ec2e70e2ea2a56ca9698596ad5e5afea81 Cr-Commit-Position: refs/heads/master@{#356967}

Patch Set 1 #

Total comments: 8

Patch Set 2 : renamed "generate..." to "create..." #

Patch Set 3 : Dan's comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+98 lines, -103 lines) Patch
D chrome/android/java/res/mipmap-hdpi/bookmark_widget_bg_highlights.png View Binary file 0 comments Download
D chrome/android/java/res/mipmap-xhdpi/bookmark_widget_bg_highlights.png View Binary file 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java View 1 2 9 chunks +91 lines, -98 lines 0 comments Download
M chrome/browser/android/shortcut_helper.cc View 1 2 3 chunks +7 lines, -5 lines 0 comments Download

Messages

Total messages: 14 (4 generated)
newt (away)
PTAL
5 years, 1 month ago (2015-10-29 18:45:07 UTC) #2
newt (away)
cc mlamouri
5 years, 1 month ago (2015-10-29 18:45:28 UTC) #3
mlamouri (slow - plz ping)
sgtm with the rename. I will let Dan do the real review. https://codereview.chromium.org/1421973005/diff/1/chrome/browser/android/shortcut_helper.cc File chrome/browser/android/shortcut_helper.cc ...
5 years, 1 month ago (2015-10-29 19:04:51 UTC) #5
newt (away)
https://codereview.chromium.org/1421973005/diff/1/chrome/browser/android/shortcut_helper.cc File chrome/browser/android/shortcut_helper.cc (right): https://codereview.chromium.org/1421973005/diff/1/chrome/browser/android/shortcut_helper.cc#newcode178 chrome/browser/android/shortcut_helper.cc:178: result = Java_ShortcutHelper_generateHomescreenIconFromWebIcon( On 2015/10/29 19:04:51, Mounir Lamouri wrote: ...
5 years, 1 month ago (2015-10-29 19:42:28 UTC) #6
newt (away)
before/after screenshots are on the bug: https://code.google.com/p/chromium/issues/detail?id=530329#c18
5 years, 1 month ago (2015-10-29 19:43:17 UTC) #7
gone
lgtm https://codereview.chromium.org/1421973005/diff/1/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java File chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java (right): https://codereview.chromium.org/1421973005/diff/1/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java#newcode260 chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java:260: public static Bitmap generateHomescreenIconFromWebIcon(Context context, Bitmap webIcon) { ...
5 years, 1 month ago (2015-10-29 20:51:25 UTC) #8
newt (away)
https://codereview.chromium.org/1421973005/diff/1/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java File chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java (right): https://codereview.chromium.org/1421973005/diff/1/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java#newcode260 chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java:260: public static Bitmap generateHomescreenIconFromWebIcon(Context context, Bitmap webIcon) { On ...
5 years, 1 month ago (2015-10-29 21:30:25 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1421973005/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1421973005/40001
5 years, 1 month ago (2015-10-29 21:32:46 UTC) #12
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years, 1 month ago (2015-10-29 22:29:51 UTC) #13
commit-bot: I haz the power
5 years, 1 month ago (2015-10-29 22:31:31 UTC) #14
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/a584b9ec2e70e2ea2a56ca9698596ad5e5afea81
Cr-Commit-Position: refs/heads/master@{#356967}

Powered by Google App Engine
This is Rietveld 408576698