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

Unified Diff: ui/views/controls/button/label_button.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/controls/button/image_button_factory.cc ('k') | ui/views/controls/button/md_text_button.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/button/label_button.cc
diff --git a/ui/views/controls/button/label_button.cc b/ui/views/controls/button/label_button.cc
index 21707e8ae7436b952450af691da4c8b88b470dc2..d1149469833ecdf21a83b9e23f1581f02b71f0d0 100644
--- a/ui/views/controls/button/label_button.cc
+++ b/ui/views/controls/button/label_button.cc
@@ -26,9 +26,9 @@
#include "ui/views/background.h"
#include "ui/views/controls/button/label_button_border.h"
#include "ui/views/layout/layout_constants.h"
+#include "ui/views/layout/layout_provider.h"
#include "ui/views/painter.h"
#include "ui/views/style/platform_style.h"
-#include "ui/views/views_delegate.h"
#include "ui/views/window/dialog_delegate.h"
namespace {
@@ -92,8 +92,8 @@ LabelButton::LabelButton(ButtonListener* listener, const base::string16& text)
is_default_(false),
style_(STYLE_TEXTBUTTON),
border_is_themed_border_(true),
- image_label_spacing_(ViewsDelegate::GetInstance()->GetDistanceMetric(
- DistanceMetric::RELATED_CONTROL_HORIZONTAL)),
+ image_label_spacing_(LayoutProvider::Get()->GetDistanceMetric(
+ DISTANCE_RELATED_CONTROL_HORIZONTAL)),
horizontal_alignment_(gfx::ALIGN_LEFT) {
SetAnimationDuration(kHoverAnimationDurationMs);
SetTextInternal(text);
« no previous file with comments | « ui/views/controls/button/image_button_factory.cc ('k') | ui/views/controls/button/md_text_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698