aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--shell/ChangeLog8
-rw-r--r--shell/e-gray-bar.c36
-rw-r--r--shell/e-shell-folder-title-bar.c20
3 files changed, 36 insertions, 28 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 6ddc02b1ad..4458cc4bf5 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,5 +1,13 @@
2001-08-16 Ettore Perazzoli <ettore@ximian.com>
+ * 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.
+
+2001-08-16 Ettore Perazzoli <ettore@ximian.com>
+
* e-shell.c (e_shell_component_maybe_crashed): s/the view for `%s'
have/the views for `%s' have/.
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);
}
diff --git a/shell/e-shell-folder-title-bar.c b/shell/e-shell-folder-title-bar.c
index 3f980ce7a8..62ae177dc6 100644
--- a/shell/e-shell-folder-title-bar.c
+++ b/shell/e-shell-folder-title-bar.c
@@ -127,6 +127,23 @@ title_button_box_realize_cb (GtkWidget *widget,
}
+/* This is used to make the labels white. Yes, yes, I know I shouldn't do
+ this. Yes, yes, I know it's evil. */
+
+static void
+set_title_bar_label_style (GtkWidget *widget)
+{
+ GtkRcStyle *rc_style = gtk_rc_style_new();
+
+ rc_style->color_flags[GTK_STATE_NORMAL] |= GTK_RC_FG;
+ rc_style->fg[GTK_STATE_NORMAL].red = 0xffff;
+ rc_style->fg[GTK_STATE_NORMAL].green = 0xffff;
+ rc_style->fg[GTK_STATE_NORMAL].blue = 0xffff;
+
+ gtk_widget_modify_style (widget, rc_style);
+}
+
+
/* Utility functions. */
static int
@@ -427,15 +444,18 @@ e_shell_folder_title_bar_construct (EShellFolderTitleBar *folder_title_bar)
priv->label = e_clipped_label_new ("");
gtk_misc_set_padding (GTK_MISC (priv->label), 5, 0);
gtk_misc_set_alignment (GTK_MISC (priv->label), 0.0, 0.5);
+ set_title_bar_label_style (priv->label);
priv->button_label = e_clipped_label_new ("");
gtk_misc_set_padding (GTK_MISC (priv->button_label), 2, 0);
gtk_misc_set_alignment (GTK_MISC (priv->button_label), 0.0, 0.5);
gtk_widget_show (priv->button_label);
+ set_title_bar_label_style (priv->button_label);
priv->folder_bar_label = e_clipped_label_new ("");
gtk_misc_set_alignment (GTK_MISC (priv->folder_bar_label), 1.0, 0.5);
gtk_widget_show (priv->folder_bar_label);
+ set_title_bar_label_style (priv->folder_bar_label);
button_hbox = gtk_hbox_new (FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button_hbox), "realize",