Improve font/color handling for download items.
The first change here is to set the font and color in the typography provider, letting DownloadItemView work in contexts and styles instead of physical attributes. This is not a complete conversion (yet) since the existing FontList members are still present, but I'll remove those in a future patch. The biggest effect of this change is to make the file name once again be 13 pt instead of 12 pt. It also makes the dangerous download and deep scanning labels use the same font as the file name. The second change is to lay out the text using full label heights instead of baselines and (strange) single-dip offsets. Using baselines dates back to the original work on Material Design top chrome in 2015, and I can't find a spec (though bugs from the time mention one). This was questioned by sky@ (the reviewer) when it landed, and it looks both semantically questionable and hazardous-for-i18n to me. As demonstrated in the screenshots on the bug, using standard Harmony line heights and putting the labels flush results in a very similar appearance to the old behavior (which wouldn't be the case if we made the font change without also making this change), except perhaps slightly less buggy. Bug: 1095970 Change-Id: I53f9876d9b7bc5523adb9cd910a659a00717d130 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2249583Reviewed-by:Allen Bauer <kylixrd@chromium.org> Reviewed-by:
Daniel Rubery <drubery@chromium.org> Commit-Queue: Daniel Rubery <drubery@chromium.org> Auto-Submit: Peter Kasting <pkasting@chromium.org> Cr-Commit-Position: refs/heads/master@{#779403}
Showing
Please register or sign in to comment