Updating branch refs/heads/master
to ff5c610d382bb0f8607e85a6d0ca75aaf8f497b8 (commit)
from 3f4905e77345a6c381912dbc53d3462700d400a9 (commit)
commit ff5c610d382bb0f8607e85a6d0ca75aaf8f497b8
Author: Florian Rivoal <[email protected]>
Date: Mon Oct 11 01:59:20 2010 +0900
Fix bar colors for some theme engines
Apply the patch proposed in bug 3588.
panel-plugin/systemload.c | 40 ++++++++++++++++++----------------------
1 files changed, 18 insertions(+), 22 deletions(-)
diff --git a/panel-plugin/systemload.c b/panel-plugin/systemload.c
index 5e53418..98a3c16 100644
--- a/panel-plugin/systemload.c
+++ b/panel-plugin/systemload.c
@@ -254,17 +254,16 @@ monitor_set_orientation (XfcePanelPlugin *plugin,
GtkOrientation orientation,
gtk_container_add(GTK_CONTAINER(global->monitor[count]->ebox),
GTK_WIDGET(global->monitor[count]->box));
- rc =
gtk_widget_get_modifier_style(GTK_WIDGET(global->monitor[count]->status));
- if (!rc) {
- rc = gtk_rc_style_new();
- }
- if (rc) {
- rc->color_flags[GTK_STATE_PRELIGHT] |= GTK_RC_BG;
- rc->bg[GTK_STATE_PRELIGHT] =
- global->monitor[count]->options.color;
- }
+ gtk_widget_modify_bg(GTK_WIDGET(global->monitor[count]->status),
+ GTK_STATE_PRELIGHT,
+ &global->monitor[count]->options.color);
+ gtk_widget_modify_bg(GTK_WIDGET(global->monitor[count]->status),
+ GTK_STATE_SELECTED,
+ &global->monitor[count]->options.color);
+ gtk_widget_modify_base(GTK_WIDGET(global->monitor[count]->status),
+ GTK_STATE_SELECTED,
+ &global->monitor[count]->options.color);
- gtk_widget_modify_style(GTK_WIDGET(global->monitor[count]->status),
rc);
gtk_widget_show(GTK_WIDGET(global->monitor[count]->status));
gtk_box_pack_start(GTK_BOX(global->monitor[count]->box),
@@ -380,18 +379,15 @@ setup_monitor(t_global_monitor *global)
gtk_label_set_text(GTK_LABEL(global->monitor[count]->label),
global->monitor[count]->options.label_text);
- gtk_widget_hide(GTK_WIDGET(global->monitor[count]->status));
- rc =
gtk_widget_get_modifier_style(GTK_WIDGET(global->monitor[count]->status));
- if (!rc) {
- rc = gtk_rc_style_new();
- }
-
- if (rc) {
- rc->color_flags[GTK_STATE_PRELIGHT] |= GTK_RC_BG;
- rc->bg[GTK_STATE_PRELIGHT] = global->monitor[count]->options.color;
- }
-
- gtk_widget_modify_style(GTK_WIDGET(global->monitor[count]->status),
rc);
+ gtk_widget_modify_bg(GTK_WIDGET(global->monitor[count]->status),
+ GTK_STATE_PRELIGHT,
+ &global->monitor[count]->options.color);
+ gtk_widget_modify_bg(GTK_WIDGET(global->monitor[count]->status),
+ GTK_STATE_SELECTED,
+ &global->monitor[count]->options.color);
+ gtk_widget_modify_base(GTK_WIDGET(global->monitor[count]->status),
+ GTK_STATE_SELECTED,
+ &global->monitor[count]->options.color);
if(global->monitor[count]->options.enabled)
{
_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits