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

Side by Side 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: 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/app_list/views/app_list_view.h" 5 #include "ui/app_list/views/app_list_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 animation_observer_->SetTarget(overlay_view_); 269 animation_observer_->SetTarget(overlay_view_);
270 settings.AddObserver(animation_observer_.get()); 270 settings.AddObserver(animation_observer_.get());
271 } 271 }
272 272
273 const float kOverlayFadeInMilliseconds = 125; 273 const float kOverlayFadeInMilliseconds = 125;
274 settings.SetTransitionDuration( 274 settings.SetTransitionDuration(
275 base::TimeDelta::FromMilliseconds(kOverlayFadeInMilliseconds)); 275 base::TimeDelta::FromMilliseconds(kOverlayFadeInMilliseconds));
276 276
277 const float kOverlayOpacity = 0.75f; 277 const float kOverlayOpacity = 0.75f;
278 overlay_view_->layer()->SetOpacity(visible ? kOverlayOpacity : 0.0f); 278 overlay_view_->layer()->SetOpacity(visible ? kOverlayOpacity : 0.0f);
279 {
280 ui::ScopedLayerAnimationSettings settings(
281 search_box_widget_->GetLayer()->GetAnimator());
282 search_box_widget_->GetLayer()->SetOpacity(visible ? kOverlayOpacity
Matt Giuca 2014/12/11 07:47:35 I like my hacks commented. // Create the illusion
calamity 2014/12/12 05:20:00 Done.
283 : 1.0f);
284 search_box_view_->SetEnabled(!visible);
285 }
279 } 286 }
280 287
281 bool AppListView::ShouldCenterWindow() const { 288 bool AppListView::ShouldCenterWindow() const {
282 return delegate_->ShouldCenterWindow(); 289 return delegate_->ShouldCenterWindow();
283 } 290 }
284 291
285 gfx::Size AppListView::GetPreferredSize() const { 292 gfx::Size AppListView::GetPreferredSize() const {
286 return app_list_main_view_->GetPreferredSize(); 293 return app_list_main_view_->GetPreferredSize();
287 } 294 }
288 295
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 if (will_appear) { 701 if (will_appear) {
695 speech_view_->SetVisible(true); 702 speech_view_->SetVisible(true);
696 } else { 703 } else {
697 app_list_main_view_->SetVisible(true); 704 app_list_main_view_->SetVisible(true);
698 search_box_view_->SetVisible(true); 705 search_box_view_->SetVisible(true);
699 search_box_view_->search_box()->RequestFocus(); 706 search_box_view_->search_box()->RequestFocus();
700 } 707 }
701 } 708 }
702 709
703 } // namespace app_list 710 } // namespace app_list
OLDNEW
« 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