[gtk+] themingengine: Use render_background_internal() to render handle background
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] themingengine: Use render_background_internal() to render handle background
- Date: Sun, 13 Mar 2011 01:40:12 +0000 (UTC)
commit 21558ae67f19002971445775c354b7588492a188
Author: Carlos Garcia Campos <carlosgc gnome org>
Date: Sat Mar 12 17:02:49 2011 +0100
themingengine: Use render_background_internal() to render handle background
Instead of using always the background color. This fixes handles that
have a background image like gnome-panel applets in a transparent
panel.
https://bugzilla.gnome.org/show_bug.cgi?id=644570
gtk/gtkthemingengine.c | 17 ++++-------------
1 files changed, 4 insertions(+), 13 deletions(-)
---
diff --git a/gtk/gtkthemingengine.c b/gtk/gtkthemingengine.c
index 717d530..df09426 100644
--- a/gtk/gtkthemingengine.c
+++ b/gtk/gtkthemingengine.c
@@ -2662,12 +2662,14 @@ gtk_theming_engine_render_handle (GtkThemingEngine *engine,
GtkStateFlags flags;
GdkRGBA *bg_color;
GdkRGBA lighter, darker;
+ GtkJunctionSides sides;
gint xx, yy;
cairo_save (cr);
flags = gtk_theming_engine_get_state (engine);
- cairo_set_line_width (cr, 1);
+ cairo_set_line_width (cr, 1.0);
+ sides = gtk_theming_engine_get_junction_sides (engine);
gtk_theming_engine_get (engine, flags,
"background-color", &bg_color,
@@ -2675,19 +2677,10 @@ gtk_theming_engine_render_handle (GtkThemingEngine *engine,
color_shade (bg_color, 0.7, &darker);
color_shade (bg_color, 1.3, &lighter);
- gdk_cairo_set_source_rgba (cr, bg_color);
- cairo_rectangle (cr, x, y, width, height);
- cairo_fill (cr);
+ render_background_internal (engine, cr, x, y, width, height, sides);
if (gtk_theming_engine_has_class (engine, GTK_STYLE_CLASS_GRIP))
{
- GtkJunctionSides sides;
-
- cairo_save (cr);
-
- cairo_set_line_width (cr, 1.0);
- sides = gtk_theming_engine_get_junction_sides (engine);
-
/* reduce confusing values to a meaningful state */
if ((sides & (GTK_JUNCTION_CORNER_TOPLEFT | GTK_JUNCTION_CORNER_BOTTOMRIGHT)) == (GTK_JUNCTION_CORNER_TOPLEFT | GTK_JUNCTION_CORNER_BOTTOMRIGHT))
sides &= ~GTK_JUNCTION_CORNER_TOPLEFT;
@@ -2932,8 +2925,6 @@ gtk_theming_engine_render_handle (GtkThemingEngine *engine,
yi += 3;
}
}
-
- cairo_restore (cr);
}
else if (gtk_theming_engine_has_class (engine, GTK_STYLE_CLASS_PANE_SEPARATOR))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]