preview: obtain the correct icon size from the helper
This commit is contained in:
parent
c4dcf3c82b
commit
344950a2e2
|
@ -408,8 +408,13 @@ static void _preview_get_image_size(Preview * preview, gint * width,
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#if GTK_CHECK_VERSION(2, 6, 0)
|
||||||
|
*width = preview->helper->get_icon_size(preview->helper->browser,
|
||||||
|
BROWSER_VIEW_THUMBNAILS);
|
||||||
|
#else
|
||||||
*width = PREVIEW_IMAGE_SIZE_DEFAULT;
|
*width = PREVIEW_IMAGE_SIZE_DEFAULT;
|
||||||
*height = PREVIEW_IMAGE_SIZE_DEFAULT;
|
#endif
|
||||||
|
*height = *width;
|
||||||
if(preview->path != NULL
|
if(preview->path != NULL
|
||||||
&& (pixbuf = gdk_pixbuf_new_from_file(preview->path,
|
&& (pixbuf = gdk_pixbuf_new_from_file(preview->path,
|
||||||
&error)) != NULL)
|
&error)) != NULL)
|
||||||
|
@ -451,8 +456,14 @@ static void _preview_get_widget_size(Preview * preview, gint * width,
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
#if GTK_CHECK_VERSION(2, 6, 0)
|
||||||
|
*width = preview->helper->get_icon_size(
|
||||||
|
preview->helper->browser,
|
||||||
|
BROWSER_VIEW_THUMBNAILS);
|
||||||
|
#else
|
||||||
*width = PREVIEW_IMAGE_SIZE_DEFAULT;
|
*width = PREVIEW_IMAGE_SIZE_DEFAULT;
|
||||||
*height = PREVIEW_IMAGE_SIZE_DEFAULT;
|
#endif
|
||||||
|
*height = *width;
|
||||||
}
|
}
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, "DEBUG: %s() %dx%d\n", __func__, *width, *height);
|
fprintf(stderr, "DEBUG: %s() %dx%d\n", __func__, *width, *height);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user