Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/libview/ev-pixbuf-cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'libview/ev-pixbuf-cache.c')
-rw-r--r--libview/ev-pixbuf-cache.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/libview/ev-pixbuf-cache.c b/libview/ev-pixbuf-cache.c
index 3827fdb..8658711 100644
--- a/libview/ev-pixbuf-cache.c
+++ b/libview/ev-pixbuf-cache.c
@@ -479,13 +479,15 @@ ev_pixbuf_cache_clear_job_sizes (EvPixbufCache *pixbuf_cache,
static void
get_selection_colors (GtkWidget *widget, GdkColor **text, GdkColor **base)
{
- if (gtk_widget_has_focus (widget)) {
- *text = &widget->style->text [GTK_STATE_SELECTED];
- *base = &widget->style->base [GTK_STATE_SELECTED];
- } else {
- *text = &widget->style->text [GTK_STATE_ACTIVE];
- *base = &widget->style->base [GTK_STATE_ACTIVE];
- }
+ GtkStyle *style = gtk_widget_get_style (widget);
+
+ if (gtk_widget_has_focus (widget)) {
+ *text = &style->text [GTK_STATE_SELECTED];
+ *base = &style->base [GTK_STATE_SELECTED];
+ } else {
+ *text = &style->text [GTK_STATE_ACTIVE];
+ *base = &style->base [GTK_STATE_ACTIVE];
+ }
}
static void