summaryrefslogtreecommitdiff
path: root/wrapper
diff options
context:
space:
mode:
authorEric Koegel <eric.koegel@gmail.com>2014-02-12 19:03:34 +0300
committerAndrzej <ndrwrdck@gmail.com>2016-10-25 22:09:37 +0100
commit5a64b644c495bd0ab350019be804251cc1f7a5b8 (patch)
treeb7a6ef2574143675c09d8c697e9d86bec5daeb85 /wrapper
parentc249913c356eece0a41593c3db0d4584de29204a (diff)
downloadxfce4-panel-5a64b644c495bd0ab350019be804251cc1f7a5b8.tar.gz
Fix transparency with alpha being 100 (Bug 10658)
A panel with style set to 'none (use system style)' and alpha to 100 is still affected by the problem which can be triggered manually by launching another indicator after the initial panel start. This patch removes an unneeded check that was causing the issue. Thanks to Thaddäus Tintenfisch for reporting the issue and finding the exact part of the code that needed to be corrected.
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);