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

Side by Side Diff: ui/app_list/app_list_constants.cc

Issue 2949733002: Show Play Store rating and price in app list (Closed)
Patch Set: Created 3 years, 6 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
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/app_list_constants.h" 5 #include "ui/app_list/app_list_constants.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 #include "ui/gfx/color_palette.h" 8 #include "ui/gfx/color_palette.h"
9 9
10 namespace app_list { 10 namespace app_list {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 const SkColor kFolderTitleHintTextColor = SkColorSetRGB(0xA0, 0xA0, 0xA0); 42 const SkColor kFolderTitleHintTextColor = SkColorSetRGB(0xA0, 0xA0, 0xA0);
43 // Color of the folder ink bubble. 43 // Color of the folder ink bubble.
44 const SkColor kFolderBubbleColor = SK_ColorWHITE; 44 const SkColor kFolderBubbleColor = SK_ColorWHITE;
45 // Color of the folder bubble shadow. 45 // Color of the folder bubble shadow.
46 const SkColor kFolderShadowColor = SkColorSetRGB(0xBF, 0xBF, 0xBF); 46 const SkColor kFolderShadowColor = SkColorSetRGB(0xBF, 0xBF, 0xBF);
47 const float kFolderBubbleRadius = 23; 47 const float kFolderBubbleRadius = 23;
48 const float kFolderBubbleOffsetY = 1; 48 const float kFolderBubbleOffsetY = 1;
49 49
50 const SkColor kCardBackgroundColor = SK_ColorWHITE; 50 const SkColor kCardBackgroundColor = SK_ColorWHITE;
51 51
52 // Colors of the text of app's price and rating.
53 const SkColor kAppPriceColor = SkColorSetRGB(0x0F, 0x9D, 0x58);
54 const SkColor kAppRatingColor = SkColorSetA(SK_ColorBLACK, 143); // 56% black.
55
52 // Duration in milliseconds for page transition. 56 // Duration in milliseconds for page transition.
53 const int kPageTransitionDurationInMs = 180; 57 const int kPageTransitionDurationInMs = 180;
54 58
55 // Duration in milliseconds for over scroll page transition. 59 // Duration in milliseconds for over scroll page transition.
56 const int kOverscrollPageTransitionDurationMs = 50; 60 const int kOverscrollPageTransitionDurationMs = 50;
57 61
58 // Duration in milliseconds for fading in the target page when opening 62 // Duration in milliseconds for fading in the target page when opening
59 // or closing a folder, and the duration for the top folder icon animation 63 // or closing a folder, and the duration for the top folder icon animation
60 // for flying in or out the folder. 64 // for flying in or out the folder.
61 const int kFolderTransitionInDurationMs = 400; 65 const int kFolderTransitionInDurationMs = 400;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 135
132 // The UMA histogram that logs how long the search query was when a result was 136 // The UMA histogram that logs how long the search query was when a result was
133 // opened. 137 // opened.
134 const char kSearchQueryLength[] = "Apps.AppListSearchQueryLength"; 138 const char kSearchQueryLength[] = "Apps.AppListSearchQueryLength";
135 139
136 // The UMA histogram that logs the Manhattan distance from the origin of the 140 // The UMA histogram that logs the Manhattan distance from the origin of the
137 // search results to the selected result. 141 // search results to the selected result.
138 const char kSearchResultDistanceFromOrigin[] = 142 const char kSearchResultDistanceFromOrigin[] =
139 "Apps.AppListSearchResultDistanceFromOrigin"; 143 "Apps.AppListSearchResultDistanceFromOrigin";
140 144
145 // Fonts of the text of app's price and rating.
146 const char kAppPriceFontList[] = "Arial, Roboto-Regular, 12px";
147 const char kAppRatingFontList[] = "Arial, Roboto-Regular, 12px";
148
141 gfx::ShadowValue GetShadowForZHeight(int z_height) { 149 gfx::ShadowValue GetShadowForZHeight(int z_height) {
142 if (z_height <= 0) 150 if (z_height <= 0)
143 return gfx::ShadowValue(); 151 return gfx::ShadowValue();
144 152
145 switch (z_height) { 153 switch (z_height) {
146 case 1: 154 case 1:
147 return gfx::ShadowValue(gfx::Vector2d(0, 1), 4, 155 return gfx::ShadowValue(gfx::Vector2d(0, 1), 4,
148 SkColorSetARGB(0x4C, 0, 0, 0)); 156 SkColorSetARGB(0x4C, 0, 0, 0));
149 case 2: 157 case 2:
150 return gfx::ShadowValue(gfx::Vector2d(0, 2), 8, 158 return gfx::ShadowValue(gfx::Vector2d(0, 2), 8,
(...skipping 12 matching lines...) Expand all
163 } 171 }
164 172
165 const gfx::ShadowValues& IconEndShadows() { 173 const gfx::ShadowValues& IconEndShadows() {
166 CR_DEFINE_STATIC_LOCAL(const gfx::ShadowValues, icon_shadows, 174 CR_DEFINE_STATIC_LOCAL(const gfx::ShadowValues, icon_shadows,
167 (1, gfx::ShadowValue(gfx::Vector2d(0, 4), 8, 175 (1, gfx::ShadowValue(gfx::Vector2d(0, 4), 8,
168 SkColorSetARGB(0x50, 0, 0, 0)))); 176 SkColorSetARGB(0x50, 0, 0, 0))));
169 return icon_shadows; 177 return icon_shadows;
170 } 178 }
171 179
172 } // namespace app_list 180 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698