Commit 05d0d0bf authored by mtomasz's avatar mtomasz Committed by Commit bot

[fsp] Polish icons in Files app.

This patch makes the icons smaller plus fixes the mask, so they are always
white (except transparent pixels) when selected.

TBR=fukino@chromium.org
TEST=Tested manually with 3 different icons.
BUG=412602

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

Cr-Commit-Position: refs/heads/master@{#302224}
parent 53cb928e
......@@ -511,5 +511,5 @@ tree:focus .tree-item[selected] > .tree-row >
list:focus li[selected] [volume-type-icon='provided'],
tree:focus .tree-item[selected] > .tree-row > [volume-type-icon='provided']{
-webkit-filter: invert(100%) grayscale(100%) brightness(200%);
-webkit-filter: contrast(0) brightness(200%);
}
......@@ -626,12 +626,12 @@ VolumeItem.prototype.isRemovable_ = function() {
*/
VolumeItem.prototype.setupIcon_ = function(icon, volumeInfo) {
icon.classList.add('volume-icon');
if (volumeInfo.volumeType === 'provided') {
if (volumeInfo.volumeType === VolumeManagerCommon.VolumeType.PROVIDED) {
var backgroundImage = '-webkit-image-set(' +
'url(chrome://extension-icon/' + volumeInfo.extensionId +
'/24/1) 1x, ' +
'/16/1) 1x, ' +
'url(chrome://extension-icon/' + volumeInfo.extensionId +
'/48/1) 2x);';
'/32/1) 2x);';
// The icon div is not yet added to DOM, therefore it is impossible to
// use style.backgroundImage.
icon.setAttribute(
......
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