summaryrefslogtreecommitdiffstats
path: root/ui/app_list
diff options
context:
space:
mode:
authorbenwells@chromium.org <benwells@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-06 12:35:20 +0000
committerbenwells@chromium.org <benwells@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-06 12:35:20 +0000
commit4fd77ef53a6f99a6b7a0985c0d2c8529a8298f9c (patch)
treee88cb783fefd65e59e865b115030896592d4155d /ui/app_list
parentabe441e84340aa250f6ba44c0a282f82b688ebad (diff)
downloadchromium_src-4fd77ef53a6f99a6b7a0985c0d2c8529a8298f9c.zip
chromium_src-4fd77ef53a6f99a6b7a0985c0d2c8529a8298f9c.tar.gz
chromium_src-4fd77ef53a6f99a6b7a0985c0d2c8529a8298f9c.tar.bz2
Make app launcher search result hover and selected colors darker.
This also unifies the constants for the search results and the grid view, and removes some unneeded animation handling (the animations have been removed). BUG=222586 Review URL: https://chromiumcodereview.appspot.com/14852009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198431 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/app_list')
-rw-r--r--ui/app_list/app_list_constants.cc5
-rw-r--r--ui/app_list/app_list_constants.h1
-rw-r--r--ui/app_list/views/app_list_item_view.cc2
-rw-r--r--ui/app_list/views/search_result_view.cc8
4 files changed, 7 insertions, 9 deletions
diff --git a/ui/app_list/app_list_constants.cc b/ui/app_list/app_list_constants.cc
index 115f600..5d69e6a 100644
--- a/ui/app_list/app_list_constants.cc
+++ b/ui/app_list/app_list_constants.cc
@@ -7,7 +7,10 @@
namespace app_list {
const SkColor kContentsBackgroundColor = SkColorSetRGB(0xF5, 0xF5, 0xF5);
-const SkColor kHoverAndPushedColor = SkColorSetARGB(0x19, 0, 0, 0);
+// 6% black over kContentsBackgroundColor
+const SkColor kSelectedColor = SkColorSetRGB(0xE6, 0xE6, 0xE6);
+// 10% black over kContentsBackgroundColor
+const SkColor kHoverAndPushedColor = SkColorSetRGB(0xDC, 0xDC, 0xDC);
// Duration in milliseconds for page transition.
const int kPageTransitionDurationInMs = 180;
diff --git a/ui/app_list/app_list_constants.h b/ui/app_list/app_list_constants.h
index 7579d99..c0fb6ec 100644
--- a/ui/app_list/app_list_constants.h
+++ b/ui/app_list/app_list_constants.h
@@ -12,6 +12,7 @@
namespace app_list {
APP_LIST_EXPORT extern const SkColor kContentsBackgroundColor;
+APP_LIST_EXPORT extern const SkColor kSelectedColor;
APP_LIST_EXPORT extern const SkColor kHoverAndPushedColor;
APP_LIST_EXPORT extern const int kPageTransitionDurationInMs;
diff --git a/ui/app_list/views/app_list_item_view.cc b/ui/app_list/views/app_list_item_view.cc
index 4f41df4..6af92da 100644
--- a/ui/app_list/views/app_list_item_view.cc
+++ b/ui/app_list/views/app_list_item_view.cc
@@ -39,8 +39,6 @@ const int kProgressBarHeight = 4;
const SkColor kTitleColor = SkColorSetRGB(0x5A, 0x5A, 0x5A);
const SkColor kTitleHoverColor = SkColorSetRGB(0x3C, 0x3C, 0x3C);
-
-const SkColor kSelectedColor = SkColorSetARGB(0x0D, 0, 0, 0);
const SkColor kHighlightedColor = kHoverAndPushedColor;
const SkColor kDownloadProgressBackgroundColor =
SkColorSetRGB(0x90, 0x90, 0x90);
diff --git a/ui/app_list/views/search_result_view.cc b/ui/app_list/views/search_result_view.cc
index b3b67e1..d0227f5 100644
--- a/ui/app_list/views/search_result_view.cc
+++ b/ui/app_list/views/search_result_view.cc
@@ -39,10 +39,6 @@ const SkColor kDefaultTextColor = SkColorSetRGB(0x33, 0x33, 0x33);
const SkColor kDimmedTextColor = SkColorSetRGB(0x96, 0x96, 0x96);
const SkColor kURLTextColor = SkColorSetRGB(0x00, 0x99, 0x33);
-const SkColor kSelectedBackgroundColor = SkColorSetRGB(0xEC, 0xEC, 0xEC);
-// 6% black on top of kSelectedBackgroundColor
-const SkColor kHoverSelectedColor = SkColorSetRGB(0xE6, 0xE6, 0xE6);
-
// A non-interactive image view to display result icon.
class IconView : public views::ImageView {
public:
@@ -185,9 +181,9 @@ void SearchResultView::OnPaint(gfx::Canvas* canvas) {
const bool selected = list_view_->IsResultViewSelected(this);
const bool hover = state() == STATE_HOVERED || state() == STATE_PRESSED;
if (hover && selected)
- canvas->FillRect(content_rect, kHoverSelectedColor);
+ canvas->FillRect(content_rect, kHoverAndPushedColor);
else if (selected || hover)
- canvas->FillRect(content_rect, kSelectedBackgroundColor);
+ canvas->FillRect(content_rect, kSelectedColor);
else
canvas->FillRect(content_rect, kContentsBackgroundColor);