X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=libview%2Fev-pixbuf-cache.c;h=8658711f793273dd37bdfcde9c7556cc9138d383;hb=65fd51ce805d7d032230e5c570434ace86ffd2e3;hp=3827fdbf098a485c790748149dc87e65c2ace02a;hpb=765e79bb75503f6369e0e3d289d40053e1872eaf;p=evince.git diff --git a/libview/ev-pixbuf-cache.c b/libview/ev-pixbuf-cache.c index 3827fdbf..8658711f 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