summaryrefslogtreecommitdiff
path: root/wrapper
diff options
context:
space:
mode:
Diffstat (limited to 'wrapper')
-rw-r--r--wrapper/wrapper-plug.c34
1 files changed, 15 insertions, 19 deletions
diff --git a/wrapper/wrapper-plug.c b/wrapper/wrapper-plug.c
index 593c4e34..0b1f1131 100644
--- a/wrapper/wrapper-plug.c
+++ b/wrapper/wrapper-plug.c
@@ -213,28 +213,24 @@ wrapper_plug_draw (GtkWidget *widget,
else
{
alpha = gtk_widget_is_composited (GTK_WIDGET (plug)) ? plug->background_alpha : 1.00;
+ cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
- if (alpha < 1.00 || plug->background_color != NULL)
+ /* get the background gdk color */
+ if (plug->background_color != NULL)
{
- cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
-
- /* get the background gdk color */
- if (plug->background_color != NULL)
- {
- color = plug->background_color;
- cairo_set_source_rgba (cr, PANEL_GDKCOLOR_TO_DOUBLE (color), alpha);
- }
- else
- {
- style = gtk_widget_get_style_context (widget);
- gtk_style_context_get_background_color (style, GTK_STATE_FLAG_NORMAL, &rgba);
- rgba.alpha = alpha;
- gdk_cairo_set_source_rgba (cr, &rgba);
- }
-
- /* draw the background color */
- cairo_paint (cr);
+ color = plug->background_color;
+ cairo_set_source_rgba (cr, PANEL_GDKCOLOR_TO_DOUBLE (color), alpha);
}
+ else
+ {
+ style = gtk_widget_get_style_context (widget);
+ gtk_style_context_get_background_color (style, GTK_STATE_FLAG_NORMAL, &rgba);
+ rgba.alpha = alpha;
+ gdk_cairo_set_source_rgba (cr, &rgba);
+ }
+
+ /* draw the background color */
+ cairo_paint (cr);
}
cairo_restore(cr);