Commit 27d2945c authored by Naoki Fukino's avatar Naoki Fukino Committed by Commit Bot

Files app: Set custom style for activated buttons on white toolbar.

The default ripple color for toolbar buttons is white, which is invisible on
white background.
We need to set custom style to make the ripple visible.

Bug: 740836
Change-Id: I7dc62bef120d5a06e8f42247cc1e5c604c6fd4ff
Reviewed-on: https://chromium-review.googlesource.com/566981Reviewed-by: default avatarTatsuhisa Yamaguchi <yamaguchi@chromium.org>
Commit-Queue: Naoki Fukino <fukino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#485857}
parent 019a1036
...@@ -153,11 +153,15 @@ ToolbarController.prototype.onSelectionChanged_ = function() { ...@@ -153,11 +153,15 @@ ToolbarController.prototype.onSelectionChanged_ = function() {
// controller which controls whole app window. Or, both toolbar and FileGrid // controller which controls whole app window. Or, both toolbar and FileGrid
// should listen to the FileSelectionHandler. // should listen to the FileSelectionHandler.
if (this.directoryModel_.getFileListSelection().multiple) { if (this.directoryModel_.getFileListSelection().multiple) {
this.filesSelectedLabel_.ownerDocument.body.classList.toggle( var bodyClassList = this.filesSelectedLabel_.ownerDocument.body.classList;
'selecting', selection.totalCount > 0); bodyClassList.toggle('selecting', selection.totalCount > 0);
this.filesSelectedLabel_.ownerDocument.body.classList.toggle( if (bodyClassList.contains('check-select') !=
'check-select', this.directoryModel_.getFileListSelection().getCheckSelectMode()) {
this.directoryModel_.getFileListSelection().getCheckSelectMode()); bodyClassList.toggle('check-select');
// Some custom styles depend on |check-select| class. We need to
// re-evaluate the custom styles when the class value is changed.
Polymer.updateStyles();
}
} }
} }
......
...@@ -60,6 +60,21 @@ ...@@ -60,6 +60,21 @@
paper-progress { paper-progress {
--paper-progress-active-color: rgb(26, 194, 34); --paper-progress-active-color: rgb(26, 194, 34);
} }
body.check-select .dialog-header files-toggle-ripple {
--files-toggle-ripple: {
background-color: black;
};
--files-toggle-ripple-activated: {
opacity: 0.08;
};
}
body.check-select .dialog-header files-ripple {
--files-ripple: {
background-color: black;
}
}
</style> </style>
<script src="foreground/js/elements_importer.js"></script> <script src="foreground/js/elements_importer.js"></script>
......
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