Desktop PWAs: menu button cropped with --top-chrome-md=material-touch-optimized --enable-features=SecondaryUiMd |
||||||
Issue descriptionChrome Version: 66 When we run chromeOS with "--top-chrome-md=material-touch-optimized --enable-features=SecondaryUiMd" command line flags the menu button icon is visually cropped. With either of the flags removed the menu button icon looks as expected. See screenshots.
,
Apr 12 2018
--draw-view-bounds-rects reveals the clip box the icon is being drawn into, possibly an inset is being applied to the view?
,
Apr 13 2018
Looks like this is the critical bit of code that changes behaviour when those two flags are enabled:
gfx::Inset HarmonyLayoutProvider::GetInsetsMetric(int metric) {
switch (metric) {
...
case views::InsetsMetric::INSETS_LABEL_BUTTON:
if (ui::MaterialDesignController::IsTouchOptimizedUiEnabled())
return gfx::Insets(kHarmonyLayoutUnit / 2, kHarmonyLayoutUnit / 2);
return ChromeLayoutProvider::GetInsetsMetric(metric);
...
}
,
Apr 13 2018
This button needs to be updated for touch UI anyway so this should get fixed as part of that effort.
,
Apr 13 2018
Created a CL that just removes the inset from the hosted app menu button as we have no need for it: https://chromium-review.googlesource.com/#/c/chromium/src/+/1011922
,
Apr 13 2018
,
Apr 16 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c071f74f1fc90449ab5ee85ae810f08d79a62759 commit c071f74f1fc90449ab5ee85ae810f08d79a62759 Author: Alan Cutter <alancutter@chromium.org> Date: Mon Apr 16 06:00:25 2018 Remove inset from hosted app menu button This CL fixes undesirably large insets on the hosted app menu button that get set when command line flags "--top-chrome-md=material-touch-optimized --enable-features=SecondaryUiMd" are used on chromeOS causing the menu icon to get cropped. Before: https://bugs.chromium.org/p/chromium/issues/attachment?aid=334387&signed_aid=zaosvDPanfssI1aE7ljaww==&inline=1 After: https://bugs.chromium.org/p/chromium/issues/attachment?aid=334388&signed_aid=sVoIaJthm75DLZgxqr06fA==&inline=1 Bug: 831968 Change-Id: I20bcc33aef41a0e0872170e7751502936c63ded4 Reviewed-on: https://chromium-review.googlesource.com/1011922 Commit-Queue: Alan Cutter <alancutter@chromium.org> Reviewed-by: Michael Wasserman <msw@chromium.org> Cr-Commit-Position: refs/heads/master@{#550938} [modify] https://crrev.com/c071f74f1fc90449ab5ee85ae810f08d79a62759/chrome/browser/ui/views/frame/hosted_app_menu_button.cc
,
Apr 16 2018
,
Apr 17 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c071f74f1fc90449ab5ee85ae810f08d79a62759 commit c071f74f1fc90449ab5ee85ae810f08d79a62759 Author: Alan Cutter <alancutter@chromium.org> Date: Mon Apr 16 06:00:25 2018 Remove inset from hosted app menu button This CL fixes undesirably large insets on the hosted app menu button that get set when command line flags "--top-chrome-md=material-touch-optimized --enable-features=SecondaryUiMd" are used on chromeOS causing the menu icon to get cropped. Before: https://bugs.chromium.org/p/chromium/issues/attachment?aid=334387&signed_aid=zaosvDPanfssI1aE7ljaww==&inline=1 After: https://bugs.chromium.org/p/chromium/issues/attachment?aid=334388&signed_aid=sVoIaJthm75DLZgxqr06fA==&inline=1 Bug: 831968 Change-Id: I20bcc33aef41a0e0872170e7751502936c63ded4 Reviewed-on: https://chromium-review.googlesource.com/1011922 Commit-Queue: Alan Cutter <alancutter@chromium.org> Reviewed-by: Michael Wasserman <msw@chromium.org> Cr-Commit-Position: refs/heads/master@{#550938} [modify] https://crrev.com/c071f74f1fc90449ab5ee85ae810f08d79a62759/chrome/browser/ui/views/frame/hosted_app_menu_button.cc
,
Apr 26 2018
Issue 836429 has been merged into this issue. |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by alancutter@chromium.org
, Apr 12 2018