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

Unified Diff: ui/views/controls/button/checkbox.cc

Issue 2627353002: Create vector icon directory for resources used by controls in ui/views. (Closed)
Patch Set: fix win? Created 3 years, 11 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/views/controls/button/checkbox.h ('k') | ui/views/controls/button/radio_button.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/button/checkbox.cc
diff --git a/ui/views/controls/button/checkbox.cc b/ui/views/controls/button/checkbox.cc
index 97637e3c4342d4e0ccb4719f2179016a16787db9..3ab2372dd1252d6b7b4119bf356786d913fb66d9 100644
--- a/ui/views/controls/button/checkbox.cc
+++ b/ui/views/controls/button/checkbox.cc
@@ -14,13 +14,13 @@
#include "ui/gfx/canvas.h"
#include "ui/gfx/color_utils.h"
#include "ui/gfx/paint_vector_icon.h"
-#include "ui/gfx/vector_icons_public.h"
#include "ui/resources/grit/ui_resources.h"
#include "ui/views/animation/ink_drop_ripple.h"
#include "ui/views/animation/square_ink_drop_ripple.h"
#include "ui/views/controls/button/label_button_border.h"
#include "ui/views/painter.h"
#include "ui/views/resources/grit/views_resources.h"
+#include "ui/views/resources/vector_icons/vector_icons.h"
#include "ui/views/style/platform_style.h"
namespace views {
@@ -189,7 +189,7 @@ SkColor Checkbox::GetInkDropBaseColor() const {
gfx::ImageSkia Checkbox::GetImage(ButtonState for_state) const {
if (UseMd()) {
return gfx::CreateVectorIcon(
- GetVectorIconId(), 16,
+ GetVectorIcon(), 16,
// When not checked, the icon color matches the button text color.
GetNativeTheme()->GetSystemColor(
checked_ ? ui::NativeTheme::kColorId_FocusedBorderColor
@@ -219,9 +219,8 @@ void Checkbox::PaintFocusRing(gfx::Canvas* canvas, const SkPaint& paint) {
canvas->DrawRoundRect(focus_rect, 2.f, paint);
}
-gfx::VectorIconId Checkbox::GetVectorIconId() const {
- return checked() ? gfx::VectorIconId::CHECKBOX_ACTIVE
- : gfx::VectorIconId::CHECKBOX_NORMAL;
+const gfx::VectorIcon& Checkbox::GetVectorIcon() const {
+ return checked() ? kCheckboxActiveIcon : kCheckboxNormalIcon;
}
void Checkbox::NotifyClick(const ui::Event& event) {
« no previous file with comments | « ui/views/controls/button/checkbox.h ('k') | ui/views/controls/button/radio_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698