Chromium Code Reviews| Index: ash/shelf/overflow_button.cc |
| diff --git a/ash/shelf/overflow_button.cc b/ash/shelf/overflow_button.cc |
| index 3602ae1fcf76deaad4fdf8df504482f4b4135549..678dbcf855bfc3dc61ed99dbe159d2e47b12b022 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,9 +20,11 @@ |
| #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 { |
| @@ -29,7 +32,11 @@ 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(); |
| + bottom_image_md_ = |
|
James Cook
2016/06/09 19:24:48
I would only load the icon when MD is enabled.
tdanderson
2016/06/09 22:36:33
Done.
|
| + CreateVectorIcon(gfx::VectorIconId::SHELF_OVERFLOW, kShelfIconColor); |
| + bottom_image_ = MaterialDesignController::IsShelfMaterial() |
| + ? &bottom_image_md_ |
| + : rb->GetImageNamed(IDR_ASH_SHELF_OVERFLOW).ToImageSkia(); |
| SetFocusBehavior(FocusBehavior::ACCESSIBLE_ONLY); |
| SetAccessibleName(l10n_util::GetStringUTF16(IDS_ASH_SHELF_OVERFLOW_NAME)); |