summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/views/bookmark_manager_view.cc16
-rw-r--r--chrome/views/single_split_view.cc15
-rw-r--r--chrome/views/single_split_view.h1
3 files changed, 21 insertions, 11 deletions
diff --git a/chrome/browser/views/bookmark_manager_view.cc b/chrome/browser/views/bookmark_manager_view.cc
index b1a5961..fc36cd6 100644
--- a/chrome/browser/views/bookmark_manager_view.cc
+++ b/chrome/browser/views/bookmark_manager_view.cc
@@ -47,6 +47,11 @@ static const int kSearchDelayMS = 200;
static const int kOrganizeMenuButtonID = 1;
static const int kToolsMenuButtonID = 2;
+// Background color.
+static const SkColor kBackgroundColorTop = SkColorSetRGB(242, 247, 253);
+static const SkColor kBackgroundColorBottom = SkColorSetRGB(223, 234, 248);
+static const int kBackgroundGradientHeight = 28;
+
namespace {
// Observer installed on the importer. When done importing the newly created
@@ -154,6 +159,8 @@ BookmarkManagerView::BookmarkManagerView(Profile* profile)
tools_menu_button->SetID(kToolsMenuButtonID);
split_view_ = new views::SingleSplitView(tree_view_, table_view_);
+ split_view_->set_background(
+ views::Background::CreateSolidBackground(kBackgroundColorBottom));
views::GridLayout* layout = new views::GridLayout(this);
SetLayoutManager(layout);
@@ -290,8 +297,13 @@ std::vector<BookmarkNode*> BookmarkManagerView::GetSelectedTableNodes() {
}
void BookmarkManagerView::PaintBackground(ChromeCanvas* canvas) {
- canvas->drawColor(color_utils::GetSysSkColor(COLOR_3DFACE),
- SkPorterDuff::kSrc_Mode);
+ canvas->drawColor(kBackgroundColorBottom, SkPorterDuff::kSrc_Mode);
+
+ SkPaint paint;
+ paint.setShader(gfx::CreateGradientShader(0, kBackgroundGradientHeight,
+ kBackgroundColorTop,
+ kBackgroundColorBottom))->safeUnref();
+ canvas->FillRectInt(0, 0, width(), kBackgroundGradientHeight, paint);
}
gfx::Size BookmarkManagerView::GetPreferredSize() {
diff --git a/chrome/views/single_split_view.cc b/chrome/views/single_split_view.cc
index 5cbcbb3..2550c57 100644
--- a/chrome/views/single_split_view.cc
+++ b/chrome/views/single_split_view.cc
@@ -6,21 +6,20 @@
#include "base/gfx/skia_utils.h"
#include "chrome/common/gfx/chrome_canvas.h"
+#include "chrome/views/background.h"
namespace views {
// Size of the divider in pixels.
-static const int kDividerSize = 6;
+static const int kDividerSize = 4;
-SingleSplitView::SingleSplitView(View* leading,
- View* trailing) : divider_x_(-1) {
+SingleSplitView::SingleSplitView(View* leading, View* trailing)
+ : divider_x_(-1) {
AddChildView(leading);
AddChildView(trailing);
-}
-
-void SingleSplitView::PaintBackground(ChromeCanvas* canvas) {
- canvas->drawColor(gfx::COLORREFToSkColor(GetSysColor(COLOR_3DFACE)),
- SkPorterDuff::kSrc_Mode);
+ set_background(
+ views::Background::CreateSolidBackground(
+ gfx::COLORREFToSkColor(GetSysColor(COLOR_3DFACE))));
}
void SingleSplitView::Layout() {
diff --git a/chrome/views/single_split_view.h b/chrome/views/single_split_view.h
index b23a086..53f64a8 100644
--- a/chrome/views/single_split_view.h
+++ b/chrome/views/single_split_view.h
@@ -15,7 +15,6 @@ class SingleSplitView : public views::View {
public:
SingleSplitView(View* leading, View* trailing);
- virtual void PaintBackground(ChromeCanvas* canvas);
virtual void Layout();
// SingleSplitView's preferred size is the sum of the preferred widths