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

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

Issue 231883003: [stash] 20140404-crbug-312961-mac-views-bridge-C-wholegrid Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 667a018858e8aaae7493af8c2246759f340056f2..046b15b80712246bfa1f98e42dab71e00b0206a1 100644
--- a/ui/app_list/views/app_list_item_view.cc
+++ b/ui/app_list/views/app_list_item_view.cc
@@ -24,6 +24,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"
@@ -43,9 +44,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;
@@ -67,7 +65,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));
@@ -75,6 +72,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)),
};
@@ -325,7 +326,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