Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(263)

Unified Diff: ui/app_list/views/app_list_view.cc

Issue 781423002: Fix app list search box rendering above app list overlay. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix_search_box_view_focus_issues
Patch Set: add_comment, opacity to 50% Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/views/app_list_view.cc
diff --git a/ui/app_list/views/app_list_view.cc b/ui/app_list/views/app_list_view.cc
index f32a48443668e50b4a9bfad3f7fd19de7aa3303b..c78c874b1b963f4c4d89cc2c3064ab1043282ffe 100644
--- a/ui/app_list/views/app_list_view.cc
+++ b/ui/app_list/views/app_list_view.cc
@@ -276,6 +276,16 @@ void AppListView::SetAppListOverlayVisible(bool visible) {
const float kOverlayOpacity = 0.75f;
overlay_view_->layer()->SetOpacity(visible ? kOverlayOpacity : 0.0f);
+ // Create the illusion that the search box is hidden behind the app list
+ // overlay mask by setting its opacity to the same value, and disabling it.
+ {
+ ui::ScopedLayerAnimationSettings settings(
+ search_box_widget_->GetLayer()->GetAnimator());
+ const float kSearchBoxWidgetOpacity = 0.5f;
+ search_box_widget_->GetLayer()->SetOpacity(visible ? kSearchBoxWidgetOpacity
+ : 1.0f);
+ search_box_view_->SetEnabled(!visible);
+ }
}
bool AppListView::ShouldCenterWindow() const {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698