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

Side by Side Diff: ui/app_list/views/contents_view.cc

Issue 898253002: Update apps grid view layout to match latest mocks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@search_box_animate_shadow
Patch Set: rebase 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 unified diff | Download patch
« no previous file with comments | « ui/app_list/views/apps_grid_view.cc ('k') | ui/app_list/views/folder_header_view.cc » ('j') | 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/contents_view.h" 5 #include "ui/app_list/views/contents_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 349
350 // There shouldn't be duplicates in either map. 350 // There shouldn't be duplicates in either map.
351 DCHECK(success); 351 DCHECK(success);
352 return page_index; 352 return page_index;
353 } 353 }
354 354
355 gfx::Rect ContentsView::GetDefaultSearchBoxBounds() const { 355 gfx::Rect ContentsView::GetDefaultSearchBoxBounds() const {
356 gfx::Rect search_box_bounds(0, 0, GetDefaultContentsSize().width(), 356 gfx::Rect search_box_bounds(0, 0, GetDefaultContentsSize().width(),
357 GetSearchBoxView()->GetPreferredSize().height()); 357 GetSearchBoxView()->GetPreferredSize().height());
358 if (switches::IsExperimentalAppListEnabled()) { 358 if (switches::IsExperimentalAppListEnabled()) {
359 search_box_bounds.set_y(kExperimentalWindowPadding); 359 search_box_bounds.set_y(kExperimentalSearchBoxPadding);
360 search_box_bounds.Inset(kExperimentalWindowPadding, 0); 360 search_box_bounds.Inset(kExperimentalSearchBoxPadding, 0);
361 } 361 }
362 return search_box_bounds; 362 return search_box_bounds;
363 } 363 }
364 364
365 gfx::Rect ContentsView::GetSearchBoxBoundsForState( 365 gfx::Rect ContentsView::GetSearchBoxBoundsForState(
366 AppListModel::State state) const { 366 AppListModel::State state) const {
367 // On the start page, the search box is in a different location. 367 // On the start page, the search box is in a different location.
368 if (state == AppListModel::STATE_START) { 368 if (state == AppListModel::STATE_START) {
369 DCHECK(start_page_view_); 369 DCHECK(start_page_view_);
370 // Convert to ContentsView space, assuming that the StartPageView is in the 370 // Convert to ContentsView space, assuming that the StartPageView is in the
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 } 514 }
515 515
516 void ContentsView::TransitionStarted() { 516 void ContentsView::TransitionStarted() {
517 } 517 }
518 518
519 void ContentsView::TransitionChanged() { 519 void ContentsView::TransitionChanged() {
520 UpdatePageBounds(); 520 UpdatePageBounds();
521 } 521 }
522 522
523 } // namespace app_list 523 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/views/apps_grid_view.cc ('k') | ui/app_list/views/folder_header_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698