diff options
-rw-r--r-- | libview/ev-view.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libview/ev-view.c b/libview/ev-view.c index d00e7f62..4db3f7e1 100644 --- a/libview/ev-view.c +++ b/libview/ev-view.c @@ -3603,6 +3603,13 @@ ev_view_expose_event (GtkWidget *widget, ev_view_loading_window_move (view); } +#if GTK_CHECK_VERSION (3, 0, 0) + gtk_render_background (gtk_widget_get_style_context (widget), + cr, + 0, 0, + gtk_widget_get_allocated_width (widget), + gtk_widget_get_allocated_height (widget)); +#endif if (view->document == NULL) return FALSE; @@ -5206,12 +5213,20 @@ ev_view_class_init (EvViewClass *class) static void ev_view_init (EvView *view) { +#if GTK_CHECK_VERSION (3, 0, 0) + GtkStyleContext *context; +#endif + gtk_widget_set_can_focus (GTK_WIDGET (view), TRUE); #if GTK_CHECK_VERSION (3, 0, 0) gtk_widget_set_has_window (GTK_WIDGET (view), TRUE); gtk_widget_set_redraw_on_allocate (GTK_WIDGET (view), FALSE); gtk_container_set_resize_mode (GTK_CONTAINER (view), GTK_RESIZE_QUEUE); + context = gtk_widget_get_style_context (GTK_WIDGET (view)); + gtk_style_context_add_class (context, "content-view"); + gtk_style_context_add_class (context, "view"); + gtk_widget_set_events (GTK_WIDGET (view), GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK | |