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

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

Issue 1773393002: Address some bubble clipping issues (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no aa Created 4 years, 9 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 | « no previous file | ui/gfx/path.h » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/search_result_page_view.h" 5 #include "ui/app_list/views/search_result_page_view.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 void SearchResultPageView::OnAnimationUpdated(double progress, 229 void SearchResultPageView::OnAnimationUpdated(double progress,
230 AppListModel::State from_state, 230 AppListModel::State from_state,
231 AppListModel::State to_state) { 231 AppListModel::State to_state) {
232 if (from_state != AppListModel::STATE_SEARCH_RESULTS && 232 if (from_state != AppListModel::STATE_SEARCH_RESULTS &&
233 to_state != AppListModel::STATE_SEARCH_RESULTS) { 233 to_state != AppListModel::STATE_SEARCH_RESULTS) {
234 return; 234 return;
235 } 235 }
236 236
237 gfx::Rect onscreen_bounds( 237 gfx::Rect onscreen_bounds(
238 GetPageBoundsForState(AppListModel::STATE_SEARCH_RESULTS)); 238 GetPageBoundsForState(AppListModel::STATE_SEARCH_RESULTS));
239 set_clip_insets(bounds().InsetsFrom(onscreen_bounds)); 239 onscreen_bounds -= bounds().OffsetFromOrigin();
240 gfx::Path path;
241 path.addRect(gfx::RectToSkRect(onscreen_bounds));
242 set_clip_path(path);
240 } 243 }
241 244
242 int SearchResultPageView::GetSearchBoxZHeight() const { 245 int SearchResultPageView::GetSearchBoxZHeight() const {
243 return switches::IsExperimentalAppListEnabled() 246 return switches::IsExperimentalAppListEnabled()
244 ? kSearchResultZHeight 247 ? kSearchResultZHeight
245 : AppListPage::GetSearchBoxZHeight(); 248 : AppListPage::GetSearchBoxZHeight();
246 } 249 }
247 250
248 void SearchResultPageView::OnHidden() { 251 void SearchResultPageView::OnHidden() {
249 ClearSelectedIndex(); 252 ClearSelectedIndex();
250 } 253 }
251 254
252 } // namespace app_list 255 } // namespace app_list
OLDNEW
« no previous file with comments | « no previous file | ui/gfx/path.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698