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 28242d0ba474901008eb4586374fe8280f0a1ef8..574325213e5df4b6c88f6e8d8df6c48e6d37e0de 100644 |
--- a/ui/views/controls/button/label_button.cc |
+++ b/ui/views/controls/button/label_button.cc |
@@ -27,13 +27,11 @@ |
#include "ui/views/controls/button/label_button_border.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 { |
-// The default spacing between the icon and text. |
-const int kSpacing = 5; |
- |
gfx::Font::Weight GetValueBolderThan(gfx::Font::Weight weight) { |
if (weight < gfx::Font::Weight::BOLD) |
return gfx::Font::Weight::BOLD; |
@@ -93,7 +91,8 @@ LabelButton::LabelButton(ButtonListener* listener, const base::string16& text) |
is_default_(false), |
style_(STYLE_TEXTBUTTON), |
border_is_themed_border_(true), |
- image_label_spacing_(kSpacing), |
+ image_label_spacing_(ViewsDelegate::GetInstance()->GetSpacingMetric( |
+ ViewsDelegate::SpacingMetric::ICON_TO_TEXT)), |
horizontal_alignment_(gfx::ALIGN_LEFT) { |
SetAnimationDuration(kHoverAnimationDurationMs); |
SetTextInternal(text); |