Commit 4b83fa56 authored by Carlos Garcia Campos's avatar Carlos Garcia Campos

ev-document-misc: Get the image from the source surface in ev_document_misc_render_thumbnail_frame

When ev_document_misc_render_thumbnail_frame is used to render a
thumbnail with a frame, and not just the frame itself, ignore the passed
in size and use the source surface if present, like we do when using
pixbufs.
parent 0a0d99b1
......@@ -142,7 +142,10 @@ ev_document_misc_render_thumbnail_frame (GtkWidget *widget,
cairo_t *cr;
GtkBorder border = {0, };
if (source_pixbuf) {
if (source_surface) {
width_r = cairo_image_surface_get_width (source_surface);
height_r = cairo_image_surface_get_height (source_surface);
} else if (source_pixbuf) {
g_return_val_if_fail (GDK_IS_PIXBUF (source_pixbuf), NULL);
width_r = gdk_pixbuf_get_width (source_pixbuf);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment