summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@novell.com>2009-05-06 13:52:38 -0500
committerFederico Mena Quintero <federico@novell.com>2009-05-06 14:03:40 -0500
commitaf03baa1bc45fb41477c80bc045568eddd975827 (patch)
tree4d3b1b7d336790693ab2254a098c649074d7096e
parentaee9b4affdecf2bce84616004b6a6d51ae368594 (diff)
downloadgnome-control-center-af03baa1bc45fb41477c80bc045568eddd975827.tar.gz
bgo#556050 - Make the monitor heading in the RANDR capplet be explicitly black
The labels are always painted against a light pastel background. Using the theme's colors makes the label hard to read on 'inverse' themes. Signed-off-by: Federico Mena Quintero <federico@novell.com>
-rw-r--r--capplets/display/ChangeLog9
-rw-r--r--capplets/display/xrandr-capplet.c18
2 files changed, 27 insertions, 0 deletions
diff --git a/capplets/display/ChangeLog b/capplets/display/ChangeLog
index 7791c89fc..cecff37ee 100644
--- a/capplets/display/ChangeLog
+++ b/capplets/display/ChangeLog
@@ -1,3 +1,12 @@
+2009-05-06 Federico Mena Quintero <federico@novell.com>
+
+ * xrandr-capplet.c (rebuild_current_monitor_label): Make the label
+ of the heading for the current monitor be explicitly black. We
+ don't want to follow the theme's colors, as the label is always
+ shown against a light pastel background --- using the theme's
+ colors makes the label hard to read on "inverse" themes. Fixes
+ the gnome-control-center part of bug #556050.
+
2009-04-11 Matthias Clasen <mclasen@redhat.com>
* display-capplet.glade: Make all mnemonics work. (#578572)
diff --git a/capplets/display/xrandr-capplet.c b/capplets/display/xrandr-capplet.c
index 1054900f5..e96689959 100644
--- a/capplets/display/xrandr-capplet.c
+++ b/capplets/display/xrandr-capplet.c
@@ -477,8 +477,26 @@ rebuild_current_monitor_label (App *app)
g_free (str);
if (use_color)
+ {
+ GdkColor black = { 0, 0, 0, 0 };
+
gtk_widget_modify_bg (app->current_monitor_event_box, app->current_monitor_event_box->state, &color);
+ /* 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 (app->current_monitor_label, GTK_WIDGET_STATE (app->current_monitor_label), &black);
+ }
+ else
+ {
+ /* Remove any modifications we did on the label's color */
+ GtkRcStyle *reset_rc_style;
+
+ reset_rc_style = gtk_rc_style_new ();
+ gtk_widget_modify_style (app->current_monitor_label, reset_rc_style); /* takes ownership of, and destroys, the rc style */
+ }
+
gtk_event_box_set_visible_window (GTK_EVENT_BOX (app->current_monitor_event_box), use_color);
}