[gnome-keyring] Transfer the color properly onto the certificate widget expander.
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-keyring] Transfer the color properly onto the certificate widget expander.
- Date: Fri, 4 Mar 2011 18:07:24 +0000 (UTC)
commit 4a4aa90e209bccb9b06ef26b5a0807eea819a879
Author: Stef Walter <stefw collabora co uk>
Date: Fri Mar 4 19:04:23 2011 +0100
Transfer the color properly onto the certificate widget expander.
* Remains white when a text selection surrounds it, this is harder
to fix.
* Highlights properly on mouse over.
https://bugzilla.gnome.org/show_bug.cgi?id=643892
gcr/gcr-display-view.c | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/gcr/gcr-display-view.c b/gcr/gcr-display-view.c
index cac086d..df55b26 100644
--- a/gcr/gcr-display-view.c
+++ b/gcr/gcr-display-view.c
@@ -217,8 +217,18 @@ static void
style_display_item (GtkWidget *widget, GcrDisplayItem *item)
{
#if GTK_CHECK_VERSION (2,91,6)
- GdkRGBA transparent = { 1.0, 1.0, 1.0, 0.0 };
- gtk_widget_override_background_color (item->details_widget, GTK_STATE_NORMAL, &transparent);
+ GtkStyleContext *style;
+ GdkRGBA color;
+
+ style = gtk_widget_get_style_context (GTK_WIDGET (widget));
+ gtk_style_context_save (style);
+
+ gtk_style_context_add_class (style, GTK_STYLE_CLASS_VIEW);
+ gtk_style_context_get_background_color (style, GTK_STATE_FLAG_NORMAL, &color);
+
+ gtk_style_context_restore (style);
+
+ gtk_widget_override_background_color (item->details_widget, GTK_STATE_NORMAL, &color);
#else
GtkStyle *style = gtk_widget_get_style (widget);
gtk_widget_modify_bg (item->details_widget, GTK_STATE_NORMAL, &style->base[GTK_STATE_NORMAL]);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]