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

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: Complete a comment in painter.h. 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
Index: ui/views/background.cc
diff --git a/ui/views/background.cc b/ui/views/background.cc
index 74d2fdaf5732616b3e0fd352b509df111b2a952b..a9c9cb1653fbf4c5e1d427d116a383cb682ec03e 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,
+ int count) {
+ Background* background = CreateBackgroundPainter(
+ true, Painter::CreateVerticalGradientRange(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);

Powered by Google App Engine
This is Rietveld 408576698