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

Unified Diff: ui/app_list/views/search_box_view.cc

Issue 657653002: Move app list search box into AppListView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « ui/app_list/views/contents_view.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/views/search_box_view.cc
diff --git a/ui/app_list/views/search_box_view.cc b/ui/app_list/views/search_box_view.cc
index 6af224c5dc7227166c4a88b11af40c0b1adf0d59..6f7273c781db1dff6cefb64582dbbfa912e583ca 100644
--- a/ui/app_list/views/search_box_view.cc
+++ b/ui/app_list/views/search_box_view.cc
@@ -6,6 +6,7 @@
#include <algorithm>
+#include "ui/app_list/app_list_constants.h"
#include "ui/app_list/app_list_model.h"
#include "ui/app_list/app_list_switches.h"
#include "ui/app_list/app_list_view_delegate.h"
@@ -45,10 +46,10 @@ const SkColor kBackgroundBorderColor = SkColorSetRGB(0xEE, 0xEE, 0xEE);
const SkColor kBackgroundBorderBottomColor = SkColorSetRGB(0xCC, 0xCC, 0xCC);
// A background that paints a solid white rounded rect with a thin grey border.
-class SearchBoxBackground : public views::Background {
+class ExperimentalSearchBoxBackground : public views::Background {
public:
- SearchBoxBackground() {}
- virtual ~SearchBoxBackground() {}
+ ExperimentalSearchBoxBackground() {}
+ virtual ~ExperimentalSearchBoxBackground() {}
private:
// views::Background overrides:
@@ -66,11 +67,11 @@ class SearchBoxBackground : public views::Background {
paint.setColor(kBackgroundBorderBottomColor);
canvas->DrawRoundRect(bounds, kBackgroundBorderCornerRadius, paint);
bounds.Inset(0, 0, 0, kBackgroundBorderBottomWidth);
- paint.setColor(SK_ColorWHITE);
+ paint.setColor(kSearchBoxBackground);
canvas->DrawRoundRect(bounds, kBackgroundBorderCornerRadius, paint);
}
- DISALLOW_COPY_AND_ASSIGN(SearchBoxBackground);
+ DISALLOW_COPY_AND_ASSIGN(ExperimentalSearchBoxBackground);
};
} // namespace
@@ -85,8 +86,12 @@ SearchBoxView::SearchBoxView(SearchBoxViewDelegate* delegate,
search_box_(new views::Textfield),
contents_view_(NULL) {
if (switches::IsExperimentalAppListEnabled()) {
- set_background(new SearchBoxBackground());
+ set_background(new ExperimentalSearchBoxBackground());
} else {
+ set_background(
+ views::Background::CreateSolidBackground(kSearchBoxBackground));
+ SetBorder(
+ views::Border::CreateSolidSidedBorder(0, 0, 1, 0, kTopSeparatorColor));
icon_view_ = new views::ImageView;
AddChildView(icon_view_);
}
« no previous file with comments | « ui/app_list/views/contents_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698