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

Unified Diff: ash/shelf/overflow_button.cc

Issue 2051663005: Vectorize the remaining material design shelf icons (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit addressed Created 4 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/shelf/overflow_button.h ('k') | ash/system/chromeos/virtual_keyboard/virtual_keyboard_tray.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/overflow_button.cc
diff --git a/ash/shelf/overflow_button.cc b/ash/shelf/overflow_button.cc
index 3602ae1fcf76deaad4fdf8df504482f4b4135549..41e1317468dcf01e7ab3cfd4d3a78abb90ec164c 100644
--- a/ash/shelf/overflow_button.cc
+++ b/ash/shelf/overflow_button.cc
@@ -4,6 +4,7 @@
#include "ash/shelf/overflow_button.h"
+#include "ash/ash_constants.h"
#include "ash/ash_switches.h"
#include "ash/common/material_design/material_design_controller.h"
#include "ash/common/shelf/shelf_constants.h"
@@ -19,17 +20,25 @@
#include "ui/gfx/animation/throb_animation.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/image/image_skia_operations.h"
+#include "ui/gfx/paint_vector_icon.h"
#include "ui/gfx/skbitmap_operations.h"
#include "ui/gfx/skia_util.h"
#include "ui/gfx/transform.h"
+#include "ui/gfx/vector_icons_public.h"
#include "ui/views/widget/widget.h"
namespace ash {
OverflowButton::OverflowButton(views::ButtonListener* listener, Shelf* shelf)
: CustomButton(listener), bottom_image_(nullptr), shelf_(shelf) {
- ui::ResourceBundle* rb = &ui::ResourceBundle::GetSharedInstance();
- bottom_image_ = rb->GetImageNamed(IDR_ASH_SHELF_OVERFLOW).ToImageSkia();
+ if (MaterialDesignController::IsShelfMaterial()) {
+ bottom_image_md_ =
+ CreateVectorIcon(gfx::VectorIconId::SHELF_OVERFLOW, kShelfIconColor);
+ bottom_image_ = &bottom_image_md_;
+ } else {
+ bottom_image_ = ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
+ IDR_ASH_SHELF_OVERFLOW);
+ }
SetFocusBehavior(FocusBehavior::ACCESSIBLE_ONLY);
SetAccessibleName(l10n_util::GetStringUTF16(IDS_ASH_SHELF_OVERFLOW_NAME));
« no previous file with comments | « ash/shelf/overflow_button.h ('k') | ash/system/chromeos/virtual_keyboard/virtual_keyboard_tray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698