diff options
author | Benjamin Berg <benjamin@sipsolutions.net> | 2010-01-10 14:14:27 (GMT) |
---|---|---|
committer | Benjamin Berg <benjamin@sipsolutions.net> | 2010-01-10 14:14:27 (GMT) |
commit | a5c453a6eb97af0342771e4d235a2bb84427796b (patch) | |
tree | d3ce5532536e3a61df55d22f50fcaeea8b783828 /gtk/engine/sugar-style.c | |
parent | 1c6b3ac70a0e4e69473d2d6a99bd2dcab05e32d5 (diff) |
Implement transparent-bg-hint so that mozilla can draw entries properly.
Diffstat (limited to 'gtk/engine/sugar-style.c')
-rw-r--r-- | gtk/engine/sugar-style.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/gtk/engine/sugar-style.c b/gtk/engine/sugar-style.c index 443a708..b81fe69 100644 --- a/gtk/engine/sugar-style.c +++ b/gtk/engine/sugar-style.c @@ -389,8 +389,12 @@ sugar_style_draw_box (GtkStyle *style, SugarInfo info; sugar_fill_generic_info (&info, style, state_type, shadow_type, widget, detail, x, y, width, height); - /* Fill the background with bg_color. */ - sugar_fill_background (cr, &info); + /* 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")) + sugar_fill_background (cr, &info); info.cont_edges = info.ltr ? EDGE_LEFT : EDGE_RIGHT; sugar_remove_corners (&info.corners, info.cont_edges); @@ -444,7 +448,8 @@ sugar_style_draw_box (GtkStyle *style, info.state = GTK_STATE_INSENSITIVE; /* Needed because the trough and bar are cached in a buffer inside GtkProgress. */ - sugar_fill_background (cr, &info); + if (!widget || !g_object_get_data(G_OBJECT (widget), "transparent-bg-hint")) + sugar_fill_background (cr, &info); sugar_draw_progressbar_trough (cr, &info); } } else if (DETAIL ("bar")) { @@ -641,7 +646,8 @@ sugar_style_draw_shadow (GtkStyle *style, } /* Fill the background with bg_color. */ - sugar_fill_background (cr, &info); + if (!widget || !g_object_get_data(G_OBJECT (widget), "transparent-bg-hint")) + sugar_fill_background (cr, &info); sugar_draw_entry (cr, &info); } else { gdouble line_width; |