| Index: ash/system/tray/system_tray.cc
|
| diff --git a/ash/system/tray/system_tray.cc b/ash/system/tray/system_tray.cc
|
| index 89e421b56781c9715a17fc025ef82274aa32b27c..cef7f3525676a693dc6eacd3c752b221b4679a87 100644
|
| --- a/ash/system/tray/system_tray.cc
|
| +++ b/ash/system/tray/system_tray.cc
|
| @@ -18,6 +18,7 @@
|
| #include "third_party/skia/include/core/SkPaint.h"
|
| #include "third_party/skia/include/core/SkPath.h"
|
| #include "ui/gfx/canvas.h"
|
| +#include "ui/gfx/skia_util.h"
|
| #include "ui/views/border.h"
|
| #include "ui/views/bubble/bubble_delegate.h"
|
| #include "ui/views/controls/label.h"
|
| @@ -38,6 +39,8 @@ const SkColor kLightColor = SkColorSetRGB(240, 240, 240);
|
| const SkColor kBackgroundColor = SK_ColorWHITE;
|
| const SkColor kShadowColor = SkColorSetARGB(25, 0, 0, 0);
|
|
|
| +const SkColor kTrayBackgroundColor = SkColorSetARGB(127, 0, 0, 0);
|
| +
|
| class SystemTrayBubbleBackground : public views::Background {
|
| public:
|
| explicit SystemTrayBubbleBackground(views::View* owner)
|
| @@ -194,6 +197,28 @@ class SystemTrayBubble : public views::BubbleDelegateView {
|
| DISALLOW_COPY_AND_ASSIGN(SystemTrayBubble);
|
| };
|
|
|
| +class SystemTrayBackground : public views::Background {
|
| + public:
|
| + SystemTrayBackground() {}
|
| + virtual ~SystemTrayBackground() {}
|
| +
|
| + private:
|
| + // Overrridden from views::Background.
|
| + virtual void Paint(gfx::Canvas* canvas, views::View* view) const OVERRIDE {
|
| + SkPaint paint;
|
| + paint.setAntiAlias(true);
|
| + paint.setStyle(SkPaint::kFill_Style);
|
| + paint.setColor(kTrayBackgroundColor);
|
| + SkPath path;
|
| + gfx::Rect bounds(view->GetContentsBounds());
|
| + SkScalar radius = SkIntToScalar(4);
|
| + path.addRoundRect(gfx::RectToSkRect(bounds), radius, radius);
|
| + canvas->GetSkCanvas()->drawPath(path, paint);
|
| + }
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(SystemTrayBackground);
|
| +};
|
| +
|
| } // namespace
|
|
|
| namespace ash {
|
| @@ -203,8 +228,7 @@ SystemTray::SystemTray()
|
| popup_(NULL) {
|
| SetLayoutManager(new views::BoxLayout(views::BoxLayout::kHorizontal,
|
| 5, 0, 3));
|
| - set_background(views::Background::CreateSolidBackground(
|
| - SkColorSetARGB(127, 0, 0, 0)));
|
| + set_background(new SystemTrayBackground);
|
| }
|
|
|
| SystemTray::~SystemTray() {
|
|
|