aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-gray-bar.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/e-gray-bar.c')
-rw-r--r--shell/e-gray-bar.c36
1 files changed, 8 insertions, 28 deletions
diff --git a/shell/e-gray-bar.c b/shell/e-gray-bar.c
index f25fa67109..e5b0aca94a 100644
--- a/shell/e-gray-bar.c
+++ b/shell/e-gray-bar.c
@@ -41,34 +41,14 @@ static GtkEventBoxClass *parent_class = NULL;
static void
endarken_style (GtkWidget *widget)
{
- GtkStyle *style;
- GtkRcStyle *new_rc_style;
- int i;
-
- style = widget->style;
-
- new_rc_style = gtk_rc_style_new ();
-
- for (i = 0; i < 5; i++) {
- new_rc_style->bg[i].red = 0x8000;
- new_rc_style->bg[i].green = 0x8000;
- new_rc_style->bg[i].blue = 0x8000;
- new_rc_style->base[i].red = 0x8000;
- new_rc_style->base[i].green = 0x8000;
- new_rc_style->base[i].blue = 0x8000;
- new_rc_style->fg[i].red = 0xffff;
- new_rc_style->fg[i].green = 0xffff;
- new_rc_style->fg[i].blue = 0xffff;
- new_rc_style->text[i].red = 0xffff;
- new_rc_style->text[i].green = 0xffff;
- new_rc_style->text[i].blue = 0xffff;
-
- new_rc_style->color_flags[i] = GTK_RC_BG | GTK_RC_FG | GTK_RC_BASE | GTK_RC_TEXT;
- }
-
- gtk_widget_modify_style (widget, new_rc_style);
-
- gtk_rc_style_unref (new_rc_style);
+ GtkRcStyle *rc_style = gtk_rc_style_new();
+
+ rc_style->color_flags[GTK_STATE_NORMAL] |= GTK_RC_BG;
+ rc_style->bg[GTK_STATE_NORMAL].red = 0x8000;
+ rc_style->bg[GTK_STATE_NORMAL].green = 0x8000;
+ rc_style->bg[GTK_STATE_NORMAL].blue = 0x8000;
+
+ gtk_widget_modify_style (widget, rc_style);
}