[Xfce4-commits] [xfce/xfce4-panel] 17/73: Fix transparency with alpha being 100 (Bug 10658)

noreply at xfce.org noreply at xfce.org
Sun Feb 26 16:33:58 CET 2017


This is an automated email from the git hooks/post-receive script.

andrzejr pushed a commit to branch master
in repository xfce/xfce4-panel.

commit 5a64b644c495bd0ab350019be804251cc1f7a5b8
Author: Eric Koegel <eric.koegel at gmail.com>
Date:   Wed Feb 12 19:03:34 2014 +0300

    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.
---
 wrapper/wrapper-plug.c | 34 +++++++++++++++-------------------
 1 file changed, 15 insertions(+), 19 deletions(-)

diff --git a/wrapper/wrapper-plug.c b/wrapper/wrapper-plug.c
index 593c4e3..0b1f113 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);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list