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

Unified Diff: ui/app_list/views/app_list_item_view.cc

Issue 187483005: Extending the Views-on-Mac experiment: whole app list grid. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: still compiles r263560 + crrev/195793005 Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/app_list/views/app_list_folder_view.cc ('k') | ui/app_list/views/apps_grid_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/views/app_list_item_view.cc
diff --git a/ui/app_list/views/app_list_item_view.cc b/ui/app_list/views/app_list_item_view.cc
index 3ce3e9c6e4a185cdc067a4058c2dffa7b90bc7dc..675b2b303f0729e2ad71d88115d7c584ad3594e5 100644
--- a/ui/app_list/views/app_list_item_view.cc
+++ b/ui/app_list/views/app_list_item_view.cc
@@ -27,6 +27,7 @@
#include "ui/gfx/image/image_skia_operations.h"
#include "ui/gfx/point.h"
#include "ui/gfx/transform_util.h"
+#include "ui/views/background.h"
#include "ui/views/controls/image_view.h"
#include "ui/views/controls/label.h"
#include "ui/views/controls/menu/menu_item_view.h"
@@ -46,9 +47,6 @@ const int kFolderPreviewRadius = 40;
const int kLeftRightPaddingChars = 1;
-// Scale to transform the icon when a drag starts.
-const float kDraggingIconScale = 1.5f;
-
// Delay in milliseconds of when the dragging UI should be shown for mouse drag.
const int kMouseDragUIDelayInMs = 200;
@@ -70,7 +68,6 @@ AppListItemView::AppListItemView(AppsGridView* apps_grid_view,
icon_->set_interactive(false);
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
- title_->SetBackgroundColor(0);
title_->SetAutoColorReadabilityEnabled(false);
title_->SetEnabledColor(kGridTitleColor);
title_->SetFontList(rb.GetFontList(kItemTextFontStyle));
@@ -78,6 +75,10 @@ AppListItemView::AppListItemView(AppsGridView* apps_grid_view,
title_->SetVisible(!item_->is_installing());
title_->Invalidate();
+ title_->SetBackgroundColor(app_list::kContentsBackgroundColor);
+ title_->set_background(views::Background::CreateSolidBackground(
+ app_list::kContentsBackgroundColor));
+
const gfx::ShadowValue kIconShadows[] = {
gfx::ShadowValue(gfx::Point(0, 2), 2, SkColorSetARGB(0x24, 0, 0, 0)),
};
@@ -332,7 +333,7 @@ void AppListItemView::ShowContextMenuForView(views::View* source,
context_menu_runner_.reset(new views::MenuRunner(menu_model));
if (context_menu_runner_->RunMenuAt(
GetWidget(), NULL, gfx::Rect(point, gfx::Size()),
- views::MenuItemView::TOPLEFT, source_type,
+ ui::TOPLEFT_MENU_ANCHOR, source_type,
views::MenuRunner::HAS_MNEMONICS) ==
views::MenuRunner::MENU_DELETED)
return;
« no previous file with comments | « ui/app_list/views/app_list_folder_view.cc ('k') | ui/app_list/views/apps_grid_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698