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

Unified Diff: ui/views/background.cc

Issue 10823229: (Views only) Add a gradient background to the tabstrip of the view tabbed pane implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove unnecessary curly braces Created 8 years, 4 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/background.h ('k') | ui/views/controls/tabbed_pane/native_tabbed_pane_views.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/background.cc
diff --git a/ui/views/background.cc b/ui/views/background.cc
index 74d2fdaf5732616b3e0fd352b509df111b2a952b..ba2ae219a742f07ca6ea9700cb6d2871b165c8a0 100644
--- a/ui/views/background.cc
+++ b/ui/views/background.cc
@@ -114,6 +114,19 @@ Background* Background::CreateVerticalGradientBackground(SkColor color1,
}
//static
+Background* Background::CreateVerticalMultiColorGradientBackground(
+ SkColor* colors,
+ SkScalar* pos,
+ size_t count) {
+ Background* background = CreateBackgroundPainter(
+ true, Painter::CreateVerticalMultiColorGradient(colors, pos, count));
+ background->SetNativeControlColor(
+ color_utils::AlphaBlend(colors[0], colors[count-1], 128));
+
+ return background;
+}
+
+//static
Background* Background::CreateBackgroundPainter(bool owns_painter,
Painter* painter) {
return new BackgroundPainter(owns_painter, painter);
« no previous file with comments | « ui/views/background.h ('k') | ui/views/controls/tabbed_pane/native_tabbed_pane_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698