Commit 6b56c4f6 authored by Noel Gordon's avatar Noel Gordon Committed by Commit Bot

[menus] All menu in files-ng shall have margin-top: 8px

Patch 2 / 3: next in the code flow that shows a menu, we must position
the menu using a getComputedStyle done internally by cu.ui positioning
code. Just before that style recalc, set the menu's margin-top: 8px in
inline style.

The inline style overrides all CSS and all action-bar menu's of files-
app have 8px margin-top as a result (to provide tap-target gap).

Bug: 1066727
Change-Id: Ie6e7a651d8bb974dc71581d460e04debb60892c4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2301713
Commit-Queue: Noel Gordon <noel@chromium.org>
Reviewed-by: default avatarAlex Danilo <adanilo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#789361}
parent fa641a21
...@@ -393,6 +393,11 @@ cr.define('cr.ui', () => { ...@@ -393,6 +393,11 @@ cr.define('cr.ui', () => {
*/ */
positionMenu_() { positionMenu_() {
const style = this.menu.style; const style = this.menu.style;
if (util.isFilesNg()) {
style.marginTop = '8px'; // crbug.com/1066727
}
// Clear any maxHeight we've set from previous calls into here. // Clear any maxHeight we've set from previous calls into here.
style.maxHeight = 'none'; style.maxHeight = 'none';
const invertLeftRight = false; const invertLeftRight = false;
......
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