Commit 62e7de9a authored by fukino's avatar fukino Committed by Commit bot

Files.app: Update filetype icons.

- Update filetype icons.
- Use PNG images as icons in directory tree, instead of SVG images.

BUG=402344,455158
TEST=manually checked.

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

Cr-Commit-Position: refs/heads/master@{#317029}
parent 79b7069a
...@@ -179,12 +179,12 @@ div.splitter { ...@@ -179,12 +179,12 @@ div.splitter {
#directory-tree .tree-row > .expand-icon { #directory-tree .tree-row > .expand-icon {
flex: none; flex: none;
height: 37px; height: 36px;
left: 3px; left: 3px;
margin: -12px -4px -13px; margin: -12px -2px;
right: 3px; right: 3px;
top: 0; top: 0;
width: 37px; width: 36px;
} }
#directory-tree .tree-row > .volume-icon { #directory-tree .tree-row > .volume-icon {
......
...@@ -18,24 +18,29 @@ tree { ...@@ -18,24 +18,29 @@ tree {
} }
.tree-row > .expand-icon { .tree-row > .expand-icon {
-webkit-transform: rotate(-90deg);
-webkit-transition: all 150ms;
background-image: -webkit-image-set(
url(../images/files/ui/expand_more.png) 1x,
url(../images/files/ui/2x/expand_more.png) 2x);
background-position: 50% 50%;
background-repeat: no-repeat;
background-size: 16px 16px;
vertical-align: top;
position: relative; position: relative;
} }
.tree-row > .expand-icon > core-icon { .tree-row[selected] > .expand-icon {
-webkit-transform: rotate(-90deg); background-image: -webkit-image-set(
-webkit-transition: all 150ms; url(../images/files/ui/expand_more_active.png) 1x,
height: 16px; url(../images/files/ui/2x/expand_more_active.png) 2x);
left: 10px;
position: absolute;
top: 10px;
width: 16px;
} }
html[dir=rtl] .tree-row > .expand-icon > core-icon { html[dir=rtl] .tree-row > .expand-icon {
-webkit-transform: rotate(90deg); -webkit-transform: rotate(90deg);
} }
.tree-item[expanded] > .tree-row > .expand-icon > core-icon { .tree-item[expanded] > .tree-row > .expand-icon {
-webkit-transform: rotate(0); -webkit-transform: rotate(0);
} }
......
...@@ -41,10 +41,8 @@ Object.freeze(DirectoryItemTreeBaseMethods); ...@@ -41,10 +41,8 @@ Object.freeze(DirectoryItemTreeBaseMethods);
var TREE_ITEM_INNTER_HTML = var TREE_ITEM_INNTER_HTML =
'<div class="tree-row">' + '<div class="tree-row">' +
' <paper-ripple fit class="recenteringTouch"></paper-ripple>' + ' <paper-ripple fit class="recenteringTouch"></paper-ripple>' +
' <span class="expand-icon">' + ' <span class="expand-icon"></span>' +
' <core-icon icon="expand-more" class="expand-icon"></core-icon>' + ' <span class="icon"></span>' +
' </span>' +
' <core-icon class="icon"></core-icon>' +
' <span class="label entry-name"></span>' + ' <span class="label entry-name"></span>' +
'</div>' + '</div>' +
'<div class="tree-children"></div>'; '<div class="tree-children"></div>';
...@@ -354,7 +352,7 @@ function SubDirectoryItem(label, dirEntry, parentDirItem, tree) { ...@@ -354,7 +352,7 @@ function SubDirectoryItem(label, dirEntry, parentDirItem, tree) {
if (location && location.rootType && location.isRootEntry) { if (location && location.rootType && location.isRootEntry) {
icon.setAttribute('volume-type-icon', location.rootType); icon.setAttribute('volume-type-icon', location.rootType);
} else { } else {
icon.icon = 'folder'; icon.setAttribute('file-type-icon', 'folder');
item.updateSharedStatusIcon(); item.updateSharedStatusIcon();
} }
...@@ -397,14 +395,11 @@ SubDirectoryItem.prototype.setContextMenu = function(menu) { ...@@ -397,14 +395,11 @@ SubDirectoryItem.prototype.setContextMenu = function(menu) {
* @override * @override
*/ */
SubDirectoryItem.prototype.updateSharedStatusIcon = function() { SubDirectoryItem.prototype.updateSharedStatusIcon = function() {
var iconElement = this.querySelector('.icon'); var icon = this.querySelector('.icon');
this.parentTree_.fileSystemMetadata.notifyEntriesChanged([this.dirEntry_]); this.parentTree_.fileSystemMetadata.notifyEntriesChanged([this.dirEntry_]);
this.parentTree_.fileSystemMetadata.get([this.dirEntry_], ['shared']).then( this.parentTree_.fileSystemMetadata.get([this.dirEntry_], ['shared']).then(
function(metadata) { function(metadata) {
if (metadata[0].shared) icon.classList.toggle('shared', metadata[0] && metadata[0].shared);
iconElement.icon = 'folder-shared';
else
iconElement.icon = 'folder';
}); });
}; };
......
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