[gtk+/gtk-style-context: 325/533] GtkThemingEngine: Use GtkSymbolicColor for shades.
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-style-context: 325/533] GtkThemingEngine: Use GtkSymbolicColor for shades.
- Date: Wed, 1 Dec 2010 02:33:08 +0000 (UTC)
commit 9094a0a2e056608c78437370687fffb558a366b5
Author: Carlos Garnacho <carlosg gnome org>
Date: Sat Nov 6 12:38:52 2010 +0100
GtkThemingEngine: Use GtkSymbolicColor for shades.
gtk/gtkthemingengine.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkthemingengine.c b/gtk/gtkthemingengine.c
index 968656f..583e87e 100644
--- a/gtk/gtkthemingengine.c
+++ b/gtk/gtkthemingengine.c
@@ -1235,10 +1235,14 @@ color_shade (const GdkRGBA *color,
gdouble factor,
GdkRGBA *color_return)
{
- color_return->red = CLAMP (color->red * factor, 0, 1);
- color_return->green = CLAMP (color->green * factor, 0, 1);
- color_return->blue = CLAMP (color->blue * factor, 0, 1);
- color_return->alpha = color->alpha;
+ GtkSymbolicColor *literal, *shade;
+
+ 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);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]