summaryrefslogtreecommitdiff
path: root/gtk/gtkthemingengine.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2012-11-25 03:33:33 +0100
committerBenjamin Otte <otte@redhat.com>2012-11-25 03:34:02 +0100
commitdf25349d63392718e720f57a0cfdd4974eec2d0d (patch)
tree682c918f922665cc15bd2d7ee1ec187f83e77c0a /gtk/gtkthemingengine.c
parent9aac4dffc537e7cb9f4eb86b1f3197394a884319 (diff)
downloadgtk+-df25349d63392718e720f57a0cfdd4974eec2d0d.tar.gz
themingengine: Do shading with GtkHSLA
... instead of with symbolic colors.
Diffstat (limited to 'gtk/gtkthemingengine.c')
-rw-r--r--gtk/gtkthemingengine.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/gtk/gtkthemingengine.c b/gtk/gtkthemingengine.c
index 0c74afbd64..4a803cd2d8 100644
--- a/gtk/gtkthemingengine.c
+++ b/gtk/gtkthemingengine.c
@@ -35,6 +35,7 @@
#include "gtkcssrgbavalueprivate.h"
#include "gtkcssshadowsvalueprivate.h"
#include "gtkcsstypesprivate.h"
+#include "gtkhslaprivate.h"
#include "gtkthemingengineprivate.h"
#include "gtkroundedboxprivate.h"
#include "gtkthemingbackgroundprivate.h"
@@ -1339,14 +1340,11 @@ color_shade (const GdkRGBA *color,
gdouble factor,
GdkRGBA *color_return)
{
- GtkSymbolicColor *literal, *shade;
+ GtkHSLA hsla;
- literal = gtk_symbolic_color_new_literal (color);
- shade = gtk_symbolic_color_new_shade (literal, factor);
- gtk_symbolic_color_unref (literal);
-
- gtk_symbolic_color_resolve (shade, NULL, color_return);
- gtk_symbolic_color_unref (shade);
+ _gtk_hsla_init_from_rgba (&hsla, color);
+ _gtk_hsla_shade (&hsla, &hsla, factor);
+ _gdk_rgba_init_from_hsla (color_return, &hsla);
}
static void