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

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

Issue 2758323002: Broke out layout metric information from ViewsDelegate to LayoutProvider (Closed)
Patch Set: Changes due to feedback. 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
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 f2c1ff972e0eb2e86d8adefb25c56c35ed1eb209..c4a2a177fd3ca6f7a86f58cbfc16fd65b880046f 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_delegate.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,7 +92,7 @@ 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(
+ image_label_spacing_(LayoutDelegate::Get()->GetDistanceMetric(
DistanceMetric::RELATED_CONTROL_HORIZONTAL)),
horizontal_alignment_(gfx::ALIGN_LEFT) {
SetAnimationDuration(kHoverAnimationDurationMs);

Powered by Google App Engine
This is Rietveld 408576698