Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(536)

Unified Diff: ui/file_manager/file_manager/foreground/js/ui/file_manager_ui.js

Issue 928353002: Files.app: Update toolbar layout and icons on it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/file_manager/file_manager/foreground/js/ui/file_manager_ui.js
diff --git a/ui/file_manager/file_manager/foreground/js/ui/file_manager_ui.js b/ui/file_manager/file_manager/foreground/js/ui/file_manager_ui.js
index 7523a6e54de89f8a9b95b82e3b2d4fd28daf98e6..03e4fbd27d3d5af4e28a1624dabf42e44cdc3463 100644
--- a/ui/file_manager/file_manager/foreground/js/ui/file_manager_ui.js
+++ b/ui/file_manager/file_manager/foreground/js/ui/file_manager_ui.js
@@ -369,21 +369,8 @@ FileManagerUI.prototype.relayout = function() {
FileManagerUI.prototype.setCurrentListType = function(listType) {
this.listContainer.setCurrentListType(listType);
- var iconElement = queryRequiredElement(this.toggleViewButton, 'core-icon');
- switch (listType) {
- case ListContainer.ListType.DETAIL:
- iconElement.icon = 'view-module';
- break;
-
- case ListContainer.ListType.THUMBNAIL:
- iconElement.icon = 'view-list';
- break;
-
- default:
- assertNotReached();
- break;
- }
-
+ this.toggleViewButton.classList.toggle(
+ 'thumbnail', listType === ListContainer.ListType.DETAIL);
this.relayout();
};

Powered by Google App Engine
This is Rietveld 408576698