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

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

Issue 945343002: Fix experimental app list search box disappearing on profile switch. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months 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/contents_view.cc
diff --git a/ui/app_list/views/contents_view.cc b/ui/app_list/views/contents_view.cc
index 11bbd3f04ebd389087ce4e381d94ea1b1baff881..e698c6bf7221b60c865153203e1b1c026c9448eb 100644
--- a/ui/app_list/views/contents_view.cc
+++ b/ui/app_list/views/contents_view.cc
@@ -466,17 +466,6 @@ gfx::Size ContentsView::GetPreferredSize() const {
}
void ContentsView::Layout() {
- // The search box is contained in a widget so set the bounds of the widget
- // rather than the SearchBoxView. In athena, the search box widget will be the
- // same as the app list widget so don't move it.
- views::Widget* search_box_widget = GetSearchBoxView()->GetWidget();
- if (search_box_widget && search_box_widget != GetWidget()) {
- gfx::Rect search_box_bounds = GetSearchBoxBoundsForState(GetActiveState());
- search_box_widget->SetBounds(ConvertRectToWidget(
- GetSearchBoxView()->GetViewBoundsForSearchBoxContentsBounds(
- search_box_bounds)));
- }
-
// Immediately finish all current animations.
pagination_model_.FinishAnimation();
@@ -511,6 +500,17 @@ void ContentsView::Layout() {
if (custom_page_view_)
custom_page_view_->SetBoundsRect(GetCustomPageCollapsedBounds());
}
+
+ // The search box is contained in a widget so set the bounds of the widget
+ // rather than the SearchBoxView. In athena, the search box widget will be the
+ // same as the app list widget so don't move it.
+ views::Widget* search_box_widget = GetSearchBoxView()->GetWidget();
+ if (search_box_widget && search_box_widget != GetWidget()) {
+ gfx::Rect search_box_bounds = GetSearchBoxBoundsForState(GetActiveState());
+ search_box_widget->SetBounds(ConvertRectToWidget(
+ GetSearchBoxView()->GetViewBoundsForSearchBoxContentsBounds(
+ search_box_bounds)));
+ }
}
bool ContentsView::OnKeyPressed(const ui::KeyEvent& event) {
« 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