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

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

Issue 884653003: gfx::ShadowValue: offset is a Vector2d, not Point. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile. Created 5 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 | « ui/app_list/views/app_list_item_view.cc ('k') | ui/gfx/shadow_value.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/contents_animator.h" 5 #include "ui/app_list/views/contents_animator.h"
6 6
7 #include "ui/app_list/app_list_constants.h" 7 #include "ui/app_list/app_list_constants.h"
8 #include "ui/app_list/app_list_switches.h" 8 #include "ui/app_list/app_list_switches.h"
9 #include "ui/app_list/views/app_list_main_view.h" 9 #include "ui/app_list/views/app_list_main_view.h"
10 #include "ui/app_list/views/contents_view.h" 10 #include "ui/app_list/views/contents_view.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 gfx::Tween::RectValueBetween(progress, search_box_from, search_box_to); 88 gfx::Tween::RectValueBetween(progress, search_box_from, search_box_to);
89 89
90 AppListModel::State from_state = 90 AppListModel::State from_state =
91 contents_view()->GetStateForPageIndex(from_page); 91 contents_view()->GetStateForPageIndex(from_page);
92 AppListModel::State to_state = contents_view()->GetStateForPageIndex(to_page); 92 AppListModel::State to_state = contents_view()->GetStateForPageIndex(to_page);
93 93
94 gfx::ShadowValue original_shadow = GetSearchBoxShadowForState(from_state); 94 gfx::ShadowValue original_shadow = GetSearchBoxShadowForState(from_state);
95 gfx::ShadowValue target_shadow = GetSearchBoxShadowForState(to_state); 95 gfx::ShadowValue target_shadow = GetSearchBoxShadowForState(to_state);
96 96
97 SearchBoxView* search_box = contents_view()->GetSearchBoxView(); 97 SearchBoxView* search_box = contents_view()->GetSearchBoxView();
98 gfx::Point offset(gfx::Tween::LinearIntValueBetween( 98 gfx::Vector2d offset(gfx::Tween::LinearIntValueBetween(
99 progress, original_shadow.x(), target_shadow.x()), 99 progress, original_shadow.x(), target_shadow.x()),
100 gfx::Tween::LinearIntValueBetween( 100 gfx::Tween::LinearIntValueBetween(
101 progress, original_shadow.y(), target_shadow.y())); 101 progress, original_shadow.y(), target_shadow.y()));
102 search_box->SetShadow(gfx::ShadowValue( 102 search_box->SetShadow(gfx::ShadowValue(
103 offset, gfx::Tween::LinearIntValueBetween( 103 offset, gfx::Tween::LinearIntValueBetween(
104 progress, original_shadow.blur(), target_shadow.blur()), 104 progress, original_shadow.blur(), target_shadow.blur()),
105 gfx::Tween::ColorValueBetween(progress, original_shadow.color(), 105 gfx::Tween::ColorValueBetween(progress, original_shadow.color(),
106 target_shadow.color()))); 106 target_shadow.color())));
107 107
108 search_box->GetWidget()->SetBounds( 108 search_box->GetWidget()->SetBounds(
109 search_box->GetViewBoundsForSearchBoxContentsBounds( 109 search_box->GetViewBoundsForSearchBoxContentsBounds(
110 contents_view()->ConvertRectToWidget(search_box_rect))); 110 contents_view()->ConvertRectToWidget(search_box_rect)));
111 } 111 }
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 gfx::Rect custom_page_rect(gfx::Tween::RectValueBetween( 218 gfx::Rect custom_page_rect(gfx::Tween::RectValueBetween(
219 progress, custom_page_origin, custom_page_on_screen)); 219 progress, custom_page_origin, custom_page_on_screen));
220 220
221 contents_view()->GetPageView(start_page)->SetBoundsRect(start_page_rect); 221 contents_view()->GetPageView(start_page)->SetBoundsRect(start_page_rect);
222 contents_view()->GetPageView(custom_page)->SetBoundsRect(custom_page_rect); 222 contents_view()->GetPageView(custom_page)->SetBoundsRect(custom_page_rect);
223 223
224 UpdateSearchBoxForDefaultAnimation(progress, start_page, custom_page); 224 UpdateSearchBoxForDefaultAnimation(progress, start_page, custom_page);
225 } 225 }
226 226
227 } // namespace app_list 227 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/views/app_list_item_view.cc ('k') | ui/gfx/shadow_value.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698