Index: ui/views/button_drag_utils.cc |
diff --git a/ui/views/button_drag_utils.cc b/ui/views/button_drag_utils.cc |
index 3fb5d12ed61b619b3e246cb0727fea3642b1c87c..60bd6e5abca8dca888391ffd2c8efd382376f9c7 100644 |
--- a/ui/views/button_drag_utils.cc |
+++ b/ui/views/button_drag_utils.cc |
@@ -14,7 +14,10 @@ |
#include "ui/gfx/geometry/vector2d.h" |
#include "ui/gfx/image/image.h" |
#include "ui/resources/grit/ui_resources.h" |
+#include "ui/views/background.h" |
+#include "ui/views/border.h" |
#include "ui/views/controls/button/label_button.h" |
+#include "ui/views/controls/button/label_button_border.h" |
#include "ui/views/drag_utils.h" |
#include "ui/views/resources/grit/views_resources.h" |
#include "ui/views/widget/widget.h" |
@@ -49,13 +52,17 @@ void SetDragImage(const GURL& url, |
button.SetTextSubpixelRenderingEnabled(false); |
const ui::NativeTheme* theme = widget->GetNativeTheme(); |
button.SetTextColor(views::Button::STATE_NORMAL, |
- theme->GetSystemColor(ui::NativeTheme::kColorId_LabelEnabledColor)); |
- gfx::ShadowValues shadows( |
- 10, |
- gfx::ShadowValue(gfx::Vector2d(0, 0), 1.0f, |
- theme->GetSystemColor( |
- ui::NativeTheme::kColorId_LabelBackgroundColor))); |
- button.SetTextShadows(shadows); |
+ theme->GetSystemColor(ui::NativeTheme::kColorId_TextfieldDefaultColor)); |
+ |
+ SkColor bg_color = theme->GetSystemColor( |
+ ui::NativeTheme::kColorId_TextfieldDefaultBackground); |
+ if (widget->IsTranslucentWindowOpacitySupported()) { |
+ button.SetTextShadows(gfx::ShadowValues( |
+ 10, gfx::ShadowValue(gfx::Vector2d(0, 0), 1.0f, bg_color))); |
+ } else { |
+ button.set_background(views::Background::CreateSolidBackground(bg_color)); |
+ button.SetBorder(button.CreateDefaultBorder()); |
+ } |
button.SetMaxSize(gfx::Size(kLinkDragImageMaxWidth, 0)); |
if (icon.isNull()) { |
button.SetImage(views::Button::STATE_NORMAL, |