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

Unified Diff: ash/system/lock_screen_action/lock_screen_action_tray.cc

Issue 2956383002: Fixup icon for new lock screen note action item (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/system/lock_screen_action/lock_screen_action_tray.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/lock_screen_action/lock_screen_action_tray.cc
diff --git a/ash/system/lock_screen_action/lock_screen_action_tray.cc b/ash/system/lock_screen_action/lock_screen_action_tray.cc
index bc475b6533dbf8cdcadda1fd695da866e561ef7e..92a7f51dfdebbace59ab3313acda6933a0d07d27 100644
--- a/ash/system/lock_screen_action/lock_screen_action_tray.cc
+++ b/ash/system/lock_screen_action/lock_screen_action_tray.cc
@@ -21,47 +21,19 @@
namespace ash {
-namespace {
-
-// The preferred size for the tray item view.
-const int kItemViewPreferredSize = 32;
-
-} // namespace
-
-// View for the tray item for the lock screen note creation action.
-class LockScreenActionTray::NewNoteActionView : public views::View {
- public:
- NewNoteActionView() {
- SetLayoutManager(new views::FillLayout);
- icon_ = new views::ImageView();
- icon_->SetImage(CreateVectorIcon(kPaletteActionCreateNoteIcon,
- kTrayIconSize, kShelfIconColor));
- icon_->SetTooltipText(
- l10n_util::GetStringUTF16(IDS_ASH_STYLUS_TOOLS_CREATE_NOTE_ACTION));
- AddChildView(icon_);
- }
-
- ~NewNoteActionView() override {}
-
- gfx::Size CalculatePreferredSize() const override {
- return gfx::Size(kItemViewPreferredSize, kItemViewPreferredSize);
- }
-
- const gfx::ImageSkia& GetImage() const { return icon_->GetImage(); }
-
- private:
- views::ImageView* icon_;
-
- DISALLOW_COPY_AND_ASSIGN(NewNoteActionView);
-};
-
LockScreenActionTray::LockScreenActionTray(Shelf* shelf)
: TrayBackgroundView(shelf),
session_observer_(this),
tray_action_observer_(this) {
SetInkDropMode(InkDropMode::ON);
SetVisible(false);
- new_note_action_view_ = new NewNoteActionView();
+ new_note_action_view_ = new views::ImageView();
+ new_note_action_view_->SetImage(
+ CreateVectorIcon(kTrayActionNewLockScreenNoteIcon, kShelfIconColor));
+ new_note_action_view_->SetTooltipText(
+ l10n_util::GetStringUTF16(IDS_ASH_STYLUS_TOOLS_CREATE_NOTE_ACTION));
+ new_note_action_view_->SetPreferredSize(
+ gfx::Size(kTrayItemSize, kTrayItemSize));
tray_container()->AddChildView(new_note_action_view_);
}
« no previous file with comments | « ash/system/lock_screen_action/lock_screen_action_tray.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698