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

Unified Diff: ui/views/examples/scroll_view_example.cc

Issue 2616273002: Native Themes: Add table header colors (Closed)
Patch Set: estade@'s comments Created 3 years, 11 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/views/controls/table/table_header.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/examples/scroll_view_example.cc
diff --git a/ui/views/examples/scroll_view_example.cc b/ui/views/examples/scroll_view_example.cc
index 4fd1aaa2970948ed351eff7775a654532e9aa837..82b1ea488d50bf56c8026d99b789efcd49c9dfa4 100644
--- a/ui/views/examples/scroll_view_example.cc
+++ b/ui/views/examples/scroll_view_example.cc
@@ -23,7 +23,7 @@ namespace examples {
class ScrollViewExample::ScrollableView : public View {
public:
ScrollableView() {
- SetColor(SK_ColorRED, SK_ColorCYAN);
+ SetColor(SK_ColorRED);
AddChildView(new LabelButton(NULL, ASCIIToUTF16("Button")));
AddChildView(new RadioButton(ASCIIToUTF16("Radio Button"), 0));
}
@@ -32,8 +32,8 @@ class ScrollViewExample::ScrollableView : public View {
return gfx::Size(width(), height());
}
- void SetColor(SkColor from, SkColor to) {
- set_background(Background::CreateVerticalGradientBackground(from, to));
+ void SetColor(SkColor color) {
+ set_background(Background::CreateSolidBackground(color));
}
void PlaceChildY(int index, int y) {
@@ -68,7 +68,7 @@ void ScrollViewExample::CreateExampleView(View* container) {
scroll_view_ = new ScrollView();
scroll_view_->SetContents(scrollable_);
scrollable_->SetBounds(0, 0, 1000, 100);
- scrollable_->SetColor(SK_ColorYELLOW, SK_ColorCYAN);
+ scrollable_->SetColor(SK_ColorYELLOW);
GridLayout* layout = new GridLayout(container);
container->SetLayoutManager(layout);
@@ -97,16 +97,16 @@ void ScrollViewExample::CreateExampleView(View* container) {
void ScrollViewExample::ButtonPressed(Button* sender, const ui::Event& event) {
if (sender == wide_) {
scrollable_->SetBounds(0, 0, 1000, 100);
- scrollable_->SetColor(SK_ColorYELLOW, SK_ColorCYAN);
+ scrollable_->SetColor(SK_ColorYELLOW);
} else if (sender == tall_) {
scrollable_->SetBounds(0, 0, 100, 1000);
- scrollable_->SetColor(SK_ColorRED, SK_ColorCYAN);
+ scrollable_->SetColor(SK_ColorRED);
} else if (sender == big_square_) {
scrollable_->SetBounds(0, 0, 1000, 1000);
- scrollable_->SetColor(SK_ColorRED, SK_ColorGREEN);
+ scrollable_->SetColor(SK_ColorCYAN);
} else if (sender == small_square_) {
scrollable_->SetBounds(0, 0, 100, 100);
- scrollable_->SetColor(SK_ColorYELLOW, SK_ColorGREEN);
+ scrollable_->SetColor(SK_ColorGREEN);
} else if (sender == scroll_to_) {
scroll_view_->contents()->ScrollRectToVisible(
gfx::Rect(20, 500, 1000, 500));
« no previous file with comments | « ui/views/controls/table/table_header.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698