From d868ec70b618c7c0461d3c6896d9f601442c7fc8 Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Thu, 16 Aug 2001 18:38:05 +0000 Subject: Evil GTK+ hackery. Of course if GTK+ made things easier, I wouldn't have to do this. * e-gray-bar.c (endarken_style): Just hardcode the colors. * e-shell-folder-title-bar.c (set_title_bar_label_style): New. (e_shell_folder_title_bar_construct): Call it on the labels here, so we get nice white labels. svn path=/trunk/; revision=12110 --- shell/e-gray-bar.c | 36 ++++++++---------------------------- 1 file changed, 8 insertions(+), 28 deletions(-) (limited to 'shell/e-gray-bar.c') 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); } -- cgit