[directorytree] Add custom files-ng tree row style handler
cr.ui.Tree has a default row style handler that applies inline style to rows to indent them (depth * 20px) using CSS padding-inline-start. files-ng requires (depth * 22px) of indent. Add a custom cr.ui.Tree row style handler for the files-ng case. Apply the indent style to the .tree-row > .file-row element. Also style its minWidth to be 12px after the row .item-icon to account for the rounded CSS border style of .tree-row > .file-row [1]. Per the current row design: 6px padding + 20px more-icon + 2px gap then 20px item-icon + then the 12px I mentioned: totals 60px. [1] if the directory tree is narrowed, the .file-row's round border can be drawn over the .item-icon (or over any element to its left depending on the tree width) if the .file-row has no minWidth style. Bug: 992819 Change-Id: I9ec261846ccb7a7e09d907dfbf23b089279f3110 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1946057Reviewed-by:Alex Danilo <adanilo@chromium.org> Reviewed-by:
Luciano Pacheco <lucmult@chromium.org> Commit-Queue: Noel Gordon <noel@chromium.org> Cr-Commit-Position: refs/heads/master@{#721299}
Showing
Please register or sign in to comment