gtk-engines r1231 - in trunk: . engines/clearlooks/src
- From: bberg svn gnome org
- To: svn-commits-list gnome org
- Subject: gtk-engines r1231 - in trunk: . engines/clearlooks/src
- Date: Thu, 14 Aug 2008 21:52:40 +0000 (UTC)
Author: bberg
Date: Thu Aug 14 21:52:40 2008
New Revision: 1231
URL: http://svn.gnome.org/viewvc/gtk-engines?rev=1231&view=rev
Log:
2008-08-14 Benjamin Berg <benjamin sipsolutions net>
* engines/clearlooks/src/clearlooks_draw.c:
* engines/clearlooks/src/clearlooks_draw_glossy.c:
* engines/clearlooks/src/clearlooks_draw_gummy.c:
* engines/clearlooks/src/clearlooks_style.c:
Add support for the "transparent-bg-hint" for entries and progress
bars.
Modified:
trunk/ChangeLog
trunk/engines/clearlooks/src/clearlooks_draw.c
trunk/engines/clearlooks/src/clearlooks_draw_glossy.c
trunk/engines/clearlooks/src/clearlooks_draw_gummy.c
trunk/engines/clearlooks/src/clearlooks_style.c
Modified: trunk/engines/clearlooks/src/clearlooks_draw.c
==============================================================================
--- trunk/engines/clearlooks/src/clearlooks_draw.c (original)
+++ trunk/engines/clearlooks/src/clearlooks_draw.c Thu Aug 14 21:52:40 2008
@@ -425,13 +425,7 @@
cairo_translate (cr, x, y);
cairo_set_line_width (cr, 1.0);
- /* Fill the background as it is initilized to base[NORMAL].
- * Relevant GTK+ bug: http://bugzilla.gnome.org/show_bug.cgi?id=513471 */
- cairo_rectangle (cr, 0, 0, width, height);
- ge_cairo_set_color (cr, ¶ms->parentbg);
- cairo_fill (cr);
-
- /* Now fill the area we want to be base[NORMAL] again. */
+ /* Now fill the area we want to be base[NORMAL]. */
ge_cairo_rounded_rectangle (cr, 2, 2, width-4, height-4, MAX(0, radius-1), params->corners);
ge_cairo_set_color (cr, base);
cairo_fill (cr);
@@ -748,12 +742,6 @@
cairo_set_line_width (cr, 1.0);
- /* Fill with bg color */
- ge_cairo_set_color (cr, &colors->bg[params->state_type]);
-
- cairo_rectangle (cr, x, y, width, height);
- cairo_fill (cr);
-
/* Create trough box */
ge_cairo_rounded_rectangle (cr, x+1, y+1, width-2, height-2, radius, params->corners);
ge_cairo_set_color (cr, &colors->shade[2]);
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 Thu Aug 14 21:52:40 2008
@@ -395,12 +395,6 @@
cairo_set_line_width (cr, 1.0);
- /* Fill with bg color */
- ge_cairo_set_color (cr, &colors->bg[params->state_type]);
-
- cairo_rectangle (cr, x, y, width, height);
- cairo_fill (cr);
-
/* Create trough box */
ge_cairo_rounded_rectangle (cr, x+1, y+1, width-2, height-2, radius, params->corners);
ge_cairo_set_color (cr, &colors->shade[2]);
Modified: trunk/engines/clearlooks/src/clearlooks_draw_gummy.c
==============================================================================
--- trunk/engines/clearlooks/src/clearlooks_draw_gummy.c (original)
+++ trunk/engines/clearlooks/src/clearlooks_draw_gummy.c Thu Aug 14 21:52:40 2008
@@ -271,13 +271,7 @@
cairo_translate (cr, x, y);
cairo_set_line_width (cr, 1.0);
- /* Fill the background as it is initilized to base[NORMAL].
- * Relevant GTK+ bug: http://bugzilla.gnome.org/show_bug.cgi?id=513471 */
- cairo_rectangle (cr, 0, 0, width, height);
- ge_cairo_set_color (cr, ¶ms->parentbg);
- cairo_fill (cr);
-
- /* Now fill the area we want to be base[NORMAL] again. */
+ /* Now fill the area we want to be base[NORMAL]. */
ge_cairo_rounded_rectangle (cr, 2, 2, width-4, height-4, MAX(0, radius-1), params->corners);
ge_cairo_set_color (cr, base);
cairo_fill (cr);
@@ -327,12 +321,6 @@
cairo_set_line_width (cr, 1.0);
- /* Fill with bg color */
- ge_cairo_set_color (cr, &colors->bg[params->state_type]);
-
- cairo_rectangle (cr, x, y, width, height);
- cairo_fill (cr);
-
/* Create trough box */
ge_cairo_rounded_rectangle (cr, x+1, y+1, width-2, height-2, radius, params->corners);
ge_cairo_set_color (cr, &colors->shade[2]);
Modified: trunk/engines/clearlooks/src/clearlooks_style.c
==============================================================================
--- trunk/engines/clearlooks/src/clearlooks_style.c (original)
+++ trunk/engines/clearlooks/src/clearlooks_style.c Thu Aug 14 21:52:40 2008
@@ -182,6 +182,17 @@
else
params.corners = CR_CORNER_TOPRIGHT | CR_CORNER_BOTTOMRIGHT;
}
+
+ /* Fill the background as it is initilized to base[NORMAL].
+ * Relevant GTK+ bug: http://bugzilla.gnome.org/show_bug.cgi?id=513471
+ * The fill only happens if no hint has been added by some application
+ * that is faking GTK+ widgets. */
+ if (widget && !g_object_get_data(G_OBJECT (widget), "transparent-bg-hint"))
+ {
+ cairo_rectangle (cr, 0, 0, width, height);
+ ge_cairo_set_color (cr, ¶ms.parentbg);
+ cairo_fill (cr);
+ }
STYLE_FUNCTION (draw_entry) (cr, &clearlooks_style->colors, ¶ms,
x, y, width, height);
@@ -647,6 +658,16 @@
clearlooks_set_widget_parameters (widget, style, state_type, ¶ms);
+ /* Fill the background as it is initilized to base[NORMAL].
+ * Relevant GTK+ bug: http://bugzilla.gnome.org/show_bug.cgi?id=513476
+ * The fill only happens if no hint has been added by some application
+ * that is faking GTK+ widgets. */
+ if (widget && !g_object_get_data(G_OBJECT (widget), "transparent-bg-hint"))
+ {
+ cairo_rectangle (cr, 0, 0, width, height);
+ ge_cairo_set_color (cr, ¶ms.parentbg);
+ cairo_fill (cr);
+ }
STYLE_FUNCTION(draw_progressbar_trough) (cr, colors, ¶ms,
x, y, width, height);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]