Files app: Update grid view icons styles
Change icons for files without thumbnails to show the file's icon as thumbnail. See crbug.com/992822#c14 for some screenshots. Change generic icons SVG to have fill color --google-grey-700 to use them background-image instead of -webkit-mask-image to simplify the CSS logic to overwrite the generic icon to specific icons. For specific icons we want to use their SVG color, which isn't possible when using -webkit-mask-image. Force the grey color for ".detail-icon" to have icons used as -webkit-mask-image have the correct color. This in turn requires to force the blue color for ".detail-checkmark" because this element is child of ".detail-icon" causing it to inherit the color. Change the JS logic to add CSS classes to make easier to style: 1. Initialize the ".img-container" with CSS class "no-thumbnail". 2. Remove "no-thumbnail" class once a thumbnail is loaded. 3. For FilesNg don't add the ".shield" div at all. 4. For FilesNg don't add the 2 divs ".checkmark.active" and ".checkmark.inactive". Instead add ".detail-checkmark" in the same place it adds for folders, which is the same as File List. 5. Change setGenericThumbnail_() (for FilesNg) to set the attribute "generic-thumbnail" as the mime type icon instead of media type, media type is limited to: image, video, audio, raw, documents, etc, which is too coarse to be able to customize icon per mime type/file type. This is the same logic used for the File List and the smaller icon near the file name. Bug: 992822 Change-Id: Idf4cd25381bf5a12767c4bc970f73f2e418dad7e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2082660 Commit-Queue: Luciano Pacheco <lucmult@chromium.org> Reviewed-by:Noel Gordon <noel@chromium.org> Cr-Commit-Position: refs/heads/master@{#746647}
Showing
Please register or sign in to comment