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

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

Issue 2758323002: Broke out layout metric information from ViewsDelegate to LayoutProvider (Closed)
Patch Set: Final feedback addressed Created 3 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/views/bubble/bubble_frame_view.cc ('k') | ui/views/controls/button/label_button.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/button/image_button_factory.cc
diff --git a/ui/views/controls/button/image_button_factory.cc b/ui/views/controls/button/image_button_factory.cc
index 5905b46bc868206ebdacf7e6cf776a26b28a8606..e1cafa904e0c05558dbef50d431b843dfa22cb50 100644
--- a/ui/views/controls/button/image_button_factory.cc
+++ b/ui/views/controls/button/image_button_factory.cc
@@ -10,8 +10,8 @@
#include "ui/views/border.h"
#include "ui/views/controls/button/custom_button.h"
#include "ui/views/controls/button/image_button.h"
+#include "ui/views/layout/layout_provider.h"
#include "ui/views/painter.h"
-#include "ui/views/views_delegate.h"
namespace views {
@@ -22,9 +22,8 @@ ImageButton* CreateVectorImageButton(ButtonListener* listener) {
button->SetImageAlignment(ImageButton::ALIGN_CENTER,
ImageButton::ALIGN_MIDDLE);
button->SetFocusPainter(nullptr);
- button->SetBorder(
- CreateEmptyBorder(ViewsDelegate::GetInstance()->GetInsetsMetric(
- InsetsMetric::VECTOR_IMAGE_BUTTON_PADDING)));
+ button->SetBorder(CreateEmptyBorder(
+ LayoutProvider::Get()->GetInsetsMetric(INSETS_VECTOR_IMAGE_BUTTON)));
return button;
}
« no previous file with comments | « ui/views/bubble/bubble_frame_view.cc ('k') | ui/views/controls/button/label_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698