Commit e064c65d authored by Manu Cornet's avatar Manu Cornet Committed by Commit Bot

CrOS Shelf: Don't show rounded corners for the in-app shelf

(Regardless of the shelf auto-hide state.)

Bug: 1009701
Change-Id: I0578c66e719caa25cee2e15a43acb3883d53946f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1832685Reviewed-by: default avatarAndrew Xu <andrewxu@chromium.org>
Commit-Queue: Manu Cornet <manucornet@chromium.org>
Cr-Commit-Position: refs/heads/master@{#701387}
parent 35a5acc3
......@@ -214,11 +214,12 @@ void ShelfWidget::DelegateView::UpdateOpaqueBackground() {
const Shelf* shelf = shelf_widget_->shelf();
const ShelfBackgroundType background_type =
shelf_widget_->GetBackgroundType();
const bool tablet_mode =
Shell::Get()->tablet_mode_controller()->InTabletMode();
const bool in_app = ShelfConfig::Get()->is_in_app();
bool show_opaque_background =
!Shell::Get()->tablet_mode_controller()->InTabletMode() ||
ShelfConfig::Get()->is_in_app() ||
!chromeos::switches::ShouldShowShelfHotseat();
!tablet_mode || in_app || !chromeos::switches::ShouldShowShelfHotseat();
if (show_opaque_background != opaque_background_.visible())
opaque_background_.SetVisible(show_opaque_background);
......@@ -239,8 +240,10 @@ void ShelfWidget::DelegateView::UpdateOpaqueBackground() {
-shelf->SelectValueForShelfAlignment(0, 0, safety_margin),
-shelf->SelectValueForShelfAlignment(safety_margin, 0, 0));
// Show rounded corners except in maximized (which includes split view) mode.
if (background_type == SHELF_BACKGROUND_MAXIMIZED) {
// Show rounded corners except in maximized (which includes split view) mode,
// or whenever we are "in app".
if (background_type == SHELF_BACKGROUND_MAXIMIZED ||
(tablet_mode && in_app)) {
opaque_background_.SetRoundedCornerRadius({0, 0, 0, 0});
} else {
opaque_background_.SetRoundedCornerRadius({
......
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