gtk-engines r1163 - in trunk: . engines/clearlooks/src



Author: acimitan
Date: Tue Apr 29 16:31:15 2008
New Revision: 1163
URL: http://svn.gnome.org/viewvc/gtk-engines?rev=1163&view=rev

Log:
2008-04-29  Andrea Cimitan  <andrea cimitan gmail com>

	* engines/clearlooks/src/clearlooks_style.c:
	(clearlooks_style_realize):
	Added the variables we should use to adjust spot[2] for dark themes.
	Still no algorithm.


Modified:
   trunk/ChangeLog
   trunk/engines/clearlooks/src/clearlooks_draw_glossy.c
   trunk/engines/clearlooks/src/clearlooks_style.c

Modified: trunk/engines/clearlooks/src/clearlooks_draw_glossy.c
==============================================================================
--- trunk/engines/clearlooks/src/clearlooks_draw_glossy.c	(original)
+++ trunk/engines/clearlooks/src/clearlooks_draw_glossy.c	Tue Apr 29 16:31:15 2008
@@ -49,10 +49,10 @@
 	ge_shade_color (color, disabled? 1.02 : 1.08, &d);
 
 	pt = cairo_pattern_create_linear (x, y, x, y+height);
-	cairo_pattern_add_color_stop_rgb (pt, 0.0,  a.r, a.g, a.b);
-	cairo_pattern_add_color_stop_rgb (pt, 0.5,  b.r, b.g, b.b);
-	cairo_pattern_add_color_stop_rgb (pt, 0.5,  c.r, c.g, c.b);
-	cairo_pattern_add_color_stop_rgb (pt, 1.0,  d.r, d.g, d.b);
+	cairo_pattern_add_color_stop_rgb (pt, 0.0, a.r, a.g, a.b);
+	cairo_pattern_add_color_stop_rgb (pt, 0.5, b.r, b.g, b.b);
+	cairo_pattern_add_color_stop_rgb (pt, 0.5, c.r, c.g, c.b);
+	cairo_pattern_add_color_stop_rgb (pt, 1.0, d.r, d.g, d.b);
 
 	cairo_set_source (cr, pt);
 	ge_cairo_rounded_rectangle (cr, x, y, width, height, radius, corners);

Modified: trunk/engines/clearlooks/src/clearlooks_style.c
==============================================================================
--- trunk/engines/clearlooks/src/clearlooks_style.c	(original)
+++ trunk/engines/clearlooks/src/clearlooks_style.c	Tue Apr 29 16:31:15 2008
@@ -1280,6 +1280,8 @@
 	double shades[] = {1.15, 0.95, 0.896, 0.82, 0.7, 0.665, 0.475, 0.45, 0.4};
 	CairoColor spot_color;
 	CairoColor bg_normal;
+	gdouble hue_spot, brightness_spot, saturation_spot;
+	gdouble hue_bg, brightness_bg, saturation_bg;
 	double contrast;
 	int i;
 
@@ -1299,6 +1301,12 @@
 
 	ge_gdk_color_to_cairo (&style->bg[GTK_STATE_SELECTED], &spot_color);
 
+	ge_hsb_from_color (&style->bg[GTK_STATE_SELECTED], &hue_spot, &saturation_spot, &brightness_spot);
+	ge_hsb_from_color (&style->bg[GTK_STATE_NORMAL],   &hue_bg,   &saturation_bg,   &brightness_bg);
+
+	/* Here to place some checks for dark themes.
+	 * We should use a different shade value for spot[2]. */
+
 	ge_shade_color (&spot_color, 1.25, &clearlooks_style->colors.spot[0]);
 	ge_shade_color (&spot_color, 1.05, &clearlooks_style->colors.spot[1]);
 	ge_shade_color (&spot_color, 0.65, &clearlooks_style->colors.spot[2]);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]