diff options
author | bshe@chromium.org <bshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-27 20:24:49 +0000 |
---|---|---|
committer | bshe@chromium.org <bshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-27 20:24:49 +0000 |
commit | b492263fad2d811e7d942e63a61ce2f6a3fdfa7c (patch) | |
tree | 5b426d71eb32e35e4623cc51f10ab500e7b20511 | |
parent | c8704331852715372d68f1bbee6ac891200826d2 (diff) | |
download | chromium_src-b492263fad2d811e7d942e63a61ce2f6a3fdfa7c.zip chromium_src-b492263fad2d811e7d942e63a61ce2f6a3fdfa7c.tar.gz chromium_src-b492263fad2d811e7d942e63a61ce2f6a3fdfa7c.tar.bz2 |
Preview panel animaiton tweak.
This CL tweaks the preview panel animation. The preview panel is now a unit
when animating away. No content in the panel change during animation.
It also eliminates the checkbox flickring issue when deselect files.
BUG=chromium-os:23175
TEST=Open file manager->select a file->deselect that file->observe the bottom
panel. The panel should ease out as a unit.
Review URL: http://codereview.chromium.org/9117053
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119487 0039d316-1c4b-4281-b951-d872f2087c98
5 files changed, 11 insertions, 11 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index 2ad590a..485f45a 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd @@ -10098,9 +10098,6 @@ Some features may be unavailable. Please check that the profile exists and you <message name="IDS_FILE_BROWSER_COMPUTING_SELECTION" desc="Computing selection..."> Computing selection... </message> - <message name="IDS_FILE_BROWSER_NOTHING_SELECTED" desc="Nothing selected."> - No files selected - </message> <message name="IDS_FILE_BROWSER_ONE_FILE_SELECTED" desc="One file selected."> One file selected, $1 </message> diff --git a/chrome/browser/extensions/extension_file_browser_private_api.cc b/chrome/browser/extensions/extension_file_browser_private_api.cc index cf1e1ba..04cb5ae 100644 --- a/chrome/browser/extensions/extension_file_browser_private_api.cc +++ b/chrome/browser/extensions/extension_file_browser_private_api.cc @@ -1641,7 +1641,6 @@ bool FileDialogStringsFunction::RunImpl() { SET_STRING(IDS_FILE_BROWSER, SELECT_SAVEAS_FILE_TITLE); SET_STRING(IDS_FILE_BROWSER, COMPUTING_SELECTION); - SET_STRING(IDS_FILE_BROWSER, NOTHING_SELECTED); SET_STRING(IDS_FILE_BROWSER, ONE_FILE_SELECTED); SET_STRING(IDS_FILE_BROWSER, ONE_DIRECTORY_SELECTED); SET_STRING(IDS_FILE_BROWSER, MANY_FILES_SELECTED); diff --git a/chrome/browser/resources/file_manager/css/file_manager.css b/chrome/browser/resources/file_manager/css/file_manager.css index 74b106d..9cf64a0 100644 --- a/chrome/browser/resources/file_manager/css/file_manager.css +++ b/chrome/browser/resources/file_manager/css/file_manager.css @@ -540,7 +540,8 @@ input.rename { } .preview-panel[visibility=hiding] { - -webkit-transition: all 220ms ease; + /* Using all seems to cause preview panel and checkbox flicking issue. */ + -webkit-transition: opacity 220ms ease; -webkit-transform: translate(0, 5px); opacity: 0; } diff --git a/chrome/browser/resources/file_manager/js/file_manager.js b/chrome/browser/resources/file_manager/js/file_manager.js index e142ef9..293e5e5 100644 --- a/chrome/browser/resources/file_manager/js/file_manager.js +++ b/chrome/browser/resources/file_manager/js/file_manager.js @@ -1777,10 +1777,6 @@ FileManager.prototype = { indexes: this.currentList_.selectionModel.selectedIndexes }; - this.previewSummary_.textContent = str('COMPUTING_SELECTION'); - removeChildren(this.taskButtons_); - removeChildren(this.previewThumbnails_); - if (!selection.indexes.length) { this.updateCommonActionButtons_(); this.updatePreviewPanelVisibility_(); @@ -1788,6 +1784,13 @@ FileManager.prototype = { return; } + this.previewSummary_.textContent = str('COMPUTING_SELECTION'); + // Removing childrens of task buttons and preview thumbnails after simple + // event dispatched (see above). This can ensure a smooth disappearing + // animation when nothing is selected. + removeChildren(this.taskButtons_); + removeChildren(this.previewThumbnails_); + var fileCount = 0; var byteCount = 0; var pendingFiles = []; @@ -2634,7 +2637,8 @@ FileManager.prototype = { var bytes = util.bytesToSi(selection.bytes); var text = ''; if (selection.totalCount == 0) { - text = str('NOTHING_SELECTED'); + // We dont want to change the string during preview panel animating away. + return; } else if (selection.fileCount == 1 && selection.directoryCount == 0) { text = selection.entries[0].name + ', ' + bytes; } else if (selection.fileCount == 0 && selection.directoryCount == 1) { diff --git a/chrome/browser/resources/file_manager/js/mock_chrome.js b/chrome/browser/resources/file_manager/js/mock_chrome.js index 6ffafc0..ac4eaaa 100644 --- a/chrome/browser/resources/file_manager/js/mock_chrome.js +++ b/chrome/browser/resources/file_manager/js/mock_chrome.js @@ -308,7 +308,6 @@ chrome.fileBrowserPrivate = { SELECT_SAVEAS_FILE_TITLE: 'Save file as', COMPUTING_SELECTION: 'Computing selection...', - NOTHING_SELECTED: 'No files selected', ONE_FILE_SELECTED: 'One file selected, $1', ONE_DIRECTORY_SELECTED: 'One directory selected', MANY_FILES_SELECTED: '$1 files selected, $2', |