summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorfukino <fukino@chromium.org>2015-03-22 23:36:46 -0700
committerCommit bot <commit-bot@chromium.org>2015-03-23 06:37:50 +0000
commitba9666c32a81411457797f78a57a6f6a80cdbb1f (patch)
tree0cb5ad0bf9ce00b5746140452ea04487a4629f5b /ui
parenta51f1f51c94835659073afa96a7a57f3544c6da9 (diff)
downloadchromium_src-ba9666c32a81411457797f78a57a6f6a80cdbb1f.zip
chromium_src-ba9666c32a81411457797f78a57a6f6a80cdbb1f.tar.gz
chromium_src-ba9666c32a81411457797f78a57a6f6a80cdbb1f.tar.bz2
Files.app: Collapse the parent folder's path on breadcrumbs considering the minimum width.
BUG=469122 TEST=manual test Review URL: https://codereview.chromium.org/1027093002 Cr-Commit-Position: refs/heads/master@{#321739}
Diffstat (limited to 'ui')
-rw-r--r--ui/file_manager/file_manager/foreground/js/ui/location_line.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/ui/file_manager/file_manager/foreground/js/ui/location_line.js b/ui/file_manager/file_manager/foreground/js/ui/location_line.js
index 2fc3d20..f3fe2fd 100644
--- a/ui/file_manager/file_manager/foreground/js/ui/location_line.js
+++ b/ui/file_manager/file_manager/foreground/js/ui/location_line.js
@@ -175,7 +175,7 @@ LocationLine.prototype.truncate = function() {
if (!this.breadcrumbs_.firstChild)
return;
- // Assume style.width == clientWidth (items have no margins or paddings).
+ // Assume style.width == clientWidth (items have no margins).
for (var item = this.breadcrumbs_.firstChild; item; item = item.nextSibling) {
item.removeAttribute('style');
@@ -219,7 +219,8 @@ LocationLine.prototype.truncate = function() {
parentCrumb.removeAttribute('collapsed');
var collapsedWidth = 0;
- if (parentCrumb && pathWidth - maxPathWidth > parentCrumb.clientWidth) {
+ if (parentCrumb &&
+ pathWidth - parentCrumb.clientWidth + minCrumbWidth > maxPathWidth) {
// At least one crumb is hidden completely (or almost completely).
// Show sign of hidden crumbs like this:
// root > some di... > ... > current directory.