diff options
author | Chris Lumens <clumens@redhat.com> | 2012-11-13 17:35:13 -0500 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2012-11-13 17:35:13 -0500 |
commit | 385c16220e7a9f2c225f04c3d8868d8e98fd933e (patch) | |
tree | 472706d507fe9eab11745723f1c0665c4b29886f /widgets | |
parent | a959228ff200a496d42ba2b2ec0077b9eb2ece78 (diff) | |
download | anaconda-385c16220e7a9f2c225f04c3d8868d8e98fd933e.tar.gz anaconda-385c16220e7a9f2c225f04c3d8868d8e98fd933e.tar.xz anaconda-385c16220e7a9f2c225f04c3d8868d8e98fd933e.zip |
DiskOverview widget selection color correction (mizmo).
Previously, the disk overview widget (visible on the first storage
screen) would display black text on a blue-colored background for
selected items. Attempts to set the foreground color to white using GTK
overrides proved futile, so this patch removes all color overrides and
instead uses GTK state flag setting to achieve the desired affect:
unselected text is black on white; selected text is white on blue.
Diffstat (limited to 'widgets')
-rw-r--r-- | widgets/src/DiskOverview.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/widgets/src/DiskOverview.c b/widgets/src/DiskOverview.c index 7e3e20208..6a4e9af00 100644 --- a/widgets/src/DiskOverview.c +++ b/widgets/src/DiskOverview.c @@ -264,12 +264,10 @@ gboolean anaconda_disk_overview_clicked(AnacondaDiskOverview *widget, GdkEvent * static void anaconda_disk_overview_toggle_background(AnacondaDiskOverview *widget) { if (widget->priv->chosen) { - GdkRGBA color; - gdk_rgba_parse(&color, "#4a90d9"); - gtk_widget_override_background_color(GTK_WIDGET(widget), GTK_STATE_FLAG_NORMAL, &color); + gtk_widget_set_state_flags(GTK_WIDGET(widget), GTK_STATE_FLAG_SELECTED, FALSE); } else - gtk_widget_override_background_color(GTK_WIDGET(widget), GTK_STATE_FLAG_NORMAL, NULL); + gtk_widget_unset_state_flags(GTK_WIDGET(widget), GTK_STATE_FLAG_SELECTED); } static void anaconda_disk_overview_finalize(AnacondaDiskOverview *widget) { @@ -316,7 +314,7 @@ static void anaconda_disk_overview_set_property(GObject *object, guint prop_id, switch(prop_id) { case PROP_DESCRIPTION: { char *markup = g_markup_printf_escaped("<span weight='bold' size='large'>%s</span>", g_value_get_string(value)); - gtk_label_set_markup(GTK_LABEL(priv->description_label), markup); + gtk_label_set_markup(GTK_LABEL(priv->description_label), markup); g_free(markup); break; } |