Commit 0e8f7d83 authored by fukino's avatar fukino Committed by Commit bot

Files.app: allow stretching thumbnails in file list.

BUG=453704
TEST=place small image on Drive and Downloads, and check if the thumbnail box/circle
is filled in grid view and list view.

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

Cr-Commit-Position: refs/heads/master@{#315294}
parent dc80f4b7
...@@ -1219,6 +1219,11 @@ li[renaming=''] .filename-label { ...@@ -1219,6 +1219,11 @@ li[renaming=''] .filename-label {
width: 28px; width: 28px;
} }
#list-container list li .detail-thumbnail > img {
-webkit-user-drag: none;
position: absolute;
}
#list-container list li:not([selected]) .detail-thumbnail.loaded { #list-container list li:not([selected]) .detail-thumbnail.loaded {
opacity: 1; opacity: 1;
} }
......
...@@ -105,7 +105,7 @@ FileGrid.prototype.updateListItemsMetadata = function(type, entries) { ...@@ -105,7 +105,7 @@ FileGrid.prototype.updateListItemsMetadata = function(type, entries) {
this.metadataCache_, this.metadataCache_,
this.volumeManager_, this.volumeManager_,
this.historyLoader_, this.historyLoader_,
ThumbnailLoader.FillMode.FILL, ThumbnailLoader.FillMode.OVER_FILL,
FileGrid.ThumbnailQuality.LOW, FileGrid.ThumbnailQuality.LOW,
/* animation */ false); /* animation */ false);
} }
...@@ -181,7 +181,7 @@ FileGrid.decorateThumbnail = function( ...@@ -181,7 +181,7 @@ FileGrid.decorateThumbnail = function(
metadataCache, metadataCache,
volumeManager, volumeManager,
historyLoader, historyLoader,
ThumbnailLoader.FillMode.FILL, ThumbnailLoader.FillMode.OVER_FILL,
FileGrid.ThumbnailQuality.LOW, FileGrid.ThumbnailQuality.LOW,
/* animation */ !previousBox); /* animation */ !previousBox);
} }
......
...@@ -805,7 +805,7 @@ FileTable.prototype.renderThumbnail_ = function(entry) { ...@@ -805,7 +805,7 @@ FileTable.prototype.renderThumbnail_ = function(entry) {
function(metadata) { function(metadata) {
var loader = new ThumbnailLoader( var loader = new ThumbnailLoader(
entry, ThumbnailLoader.LoaderType.IMAGE, metadata); entry, ThumbnailLoader.LoaderType.IMAGE, metadata);
loader.load(box, ThumbnailLoader.FillMode.FILL, loader.load(box, ThumbnailLoader.FillMode.OVER_FILL,
ThumbnailLoader.OptimizationMode.DISCARD_DETACHED, ThumbnailLoader.OptimizationMode.DISCARD_DETACHED,
function(image, transform) { function(image, transform) {
box.classList.add('loaded'); box.classList.add('loaded');
......
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