[Xfce4-commits] <xfce4-diskperf-plugin:master> Appearance improvements

Florian Rivoal noreply at xfce.org
Sat Feb 26 15:16:02 CET 2011


Updating branch refs/heads/master
         to 4d708bb4d2754328c0da6fe62a5b17b579c6f4c8 (commit)
       from 582159afcf90565f931387cac08132cf0e2f39db (commit)

commit 4d708bb4d2754328c0da6fe62a5b17b579c6f4c8
Author: Florian Rivoal <frivoal at xfce.org>
Date:   Sat Feb 26 19:48:30 2011 +0900

    Appearance improvements
    
    Fixes transparency and bar colors, thanks to the patch from bug #7342.

 panel-plugin/main.c |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/panel-plugin/main.c b/panel-plugin/main.c
index d6ff862..43b0390 100644
--- a/panel-plugin/main.c
+++ b/panel-plugin/main.c
@@ -293,14 +293,15 @@ static int SetSingleBarColor (struct diskperf_t *p_poPlugin, int p_iBar)
     Widget_t       *pwBar;
 
     pwBar = poMonitor->aoPerfBar[p_iBar].pwBar;
-    poStyle = gtk_widget_get_modifier_style (GTK_WIDGET (*pwBar));
-    if (!poStyle)
-	poStyle = gtk_rc_style_new ();
-    else {
-	poStyle->color_flags[GTK_STATE_PRELIGHT] |= GTK_RC_BG;
-	poStyle->bg[GTK_STATE_PRELIGHT] = poConf->aoColor[p_iBar];
-    }
-    gtk_widget_modify_style (GTK_WIDGET (*pwBar), poStyle);
+	gtk_widget_modify_bg(GTK_WIDGET(*pwBar),
+						 GTK_STATE_PRELIGHT,
+						 &poConf->aoColor[p_iBar]);
+	gtk_widget_modify_bg(GTK_WIDGET(*pwBar),
+						 GTK_STATE_SELECTED,
+						 &poConf->aoColor[p_iBar]);
+	gtk_widget_modify_base(GTK_WIDGET(*pwBar),
+						 GTK_STATE_SELECTED,
+						 &poConf->aoColor[p_iBar]);
     return (0);
 }				/* SetSingleBarColor() */
 



More information about the Xfce4-commits mailing list