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

Side by Side Diff: ui/app_list/views/folder_header_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/contents_view.cc ('k') | ui/app_list/views/page_switcher.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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/folder_header_view.h" 5 #include "ui/app_list/views/folder_header_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "ui/app_list/app_list_constants.h" 10 #include "ui/app_list/app_list_constants.h"
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 194
195 void FolderHeaderView::OnPaint(gfx::Canvas* canvas) { 195 void FolderHeaderView::OnPaint(gfx::Canvas* canvas) {
196 views::View::OnPaint(canvas); 196 views::View::OnPaint(canvas);
197 197
198 gfx::Rect rect(GetContentsBounds()); 198 gfx::Rect rect(GetContentsBounds());
199 if (rect.IsEmpty() || !folder_name_visible_) 199 if (rect.IsEmpty() || !folder_name_visible_)
200 return; 200 return;
201 201
202 // Draw bottom separator line. 202 // Draw bottom separator line.
203 int horizontal_padding = app_list::switches::IsExperimentalAppListEnabled() 203 int horizontal_padding = app_list::switches::IsExperimentalAppListEnabled()
204 ? kExperimentalWindowPadding 204 ? kExperimentalAppsGridPadding
205 : kBottomSeparatorPadding; 205 : kBottomSeparatorPadding;
206 rect.Inset(horizontal_padding, 0); 206 rect.Inset(horizontal_padding, 0);
207 rect.set_y(rect.bottom() - kBottomSeparatorHeight); 207 rect.set_y(rect.bottom() - kBottomSeparatorHeight);
208 rect.set_height(kBottomSeparatorHeight); 208 rect.set_height(kBottomSeparatorHeight);
209 canvas->FillRect(rect, kTopSeparatorColor); 209 canvas->FillRect(rect, kTopSeparatorColor);
210 } 210 }
211 211
212 void FolderHeaderView::ContentsChanged(views::Textfield* sender, 212 void FolderHeaderView::ContentsChanged(views::Textfield* sender,
213 const base::string16& new_contents) { 213 const base::string16& new_contents) {
214 // Temporarily remove from observer to ignore data change caused by us. 214 // Temporarily remove from observer to ignore data change caused by us.
(...skipping 16 matching lines...) Expand all
231 void FolderHeaderView::ButtonPressed(views::Button* sender, 231 void FolderHeaderView::ButtonPressed(views::Button* sender,
232 const ui::Event& event) { 232 const ui::Event& event) {
233 delegate_->NavigateBack(folder_item_, event); 233 delegate_->NavigateBack(folder_item_, event);
234 } 234 }
235 235
236 void FolderHeaderView::ItemNameChanged() { 236 void FolderHeaderView::ItemNameChanged() {
237 Update(); 237 Update();
238 } 238 }
239 239
240 } // namespace app_list 240 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/views/contents_view.cc ('k') | ui/app_list/views/page_switcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698