summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@novell.com>2009-05-06 12:51:57 -0500
committerFederico Mena Quintero <federico@novell.com>2009-05-06 12:51:57 -0500
commit1556f925e58e97a007920e6e5376f2c61e90d3c4 (patch)
treef93cd4f0b2c72133b00fe46d2fe843e841c2fb4b
parent3f7d64c416f649aecf070e301aef080d4a75abd9 (diff)
downloadgnome-desktop-1556f925e58e97a007920e6e5376f2c61e90d3c4.tar.gz
bgo#556050 - Make GnomeRRLabeler's labels explicitly black
The labels are always drawn against a light pastel background. When using an inverse-colored theme (with text nearly white, backgrounds nearly black), we want GnomeRRLabeler's labels to still be black. Otherwise, the color from the theme will be hard to read against the light pastel background in the per-monitor labels. Signed-off-by: Federico Mena Quintero <federico@novell.com>
-rw-r--r--libgnome-desktop/gnome-rr-labeler.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libgnome-desktop/gnome-rr-labeler.c b/libgnome-desktop/gnome-rr-labeler.c
index c7f443fc..aa153646 100644
--- a/libgnome-desktop/gnome-rr-labeler.c
+++ b/libgnome-desktop/gnome-rr-labeler.c
@@ -181,6 +181,7 @@ create_label_window (GnomeRRLabeler *labeler, GnomeOutputInfo *output, GdkColor
GtkWidget *window;
GtkWidget *widget;
char *str;
+ GdkColor black = { 0, 0, 0, 0 };
window = gtk_window_new (GTK_WINDOW_POPUP);
GTK_WIDGET_SET_FLAGS (window, GTK_APP_PAINTABLE);
@@ -201,6 +202,12 @@ create_label_window (GnomeRRLabeler *labeler, GnomeOutputInfo *output, GdkColor
gtk_label_set_markup (GTK_LABEL (widget), str);
g_free (str);
+ /* Make the label explicitly black. We don't want it to follow the
+ * theme's colors, since the label is always shown against a light
+ * pastel background. See bgo#556050
+ */
+ gtk_widget_modify_fg (widget, GTK_WIDGET_STATE (widget), &black);
+
gtk_container_add (GTK_CONTAINER (window), widget);
/* Should we center this at the top edge of the monitor, instead of using the upper-left corner? */