pull/11/head
parent 3b1b89462d
commit dd00452780

@ -234,8 +234,8 @@ int yon_image_resize_from_container(GtkImage *target, GdkPixbuf *pixbuf_unscaled
int width = gtk_widget_get_allocated_width(gtk_widget_get_parent(gtk_widget_get_parent(GTK_WIDGET(target))));
int height = gtk_widget_get_allocated_height(gtk_widget_get_parent(gtk_widget_get_parent(GTK_WIDGET(target))));
int newImgWidthDef = (width <= 30) ? width : width - 30;
int newImgHeightDef = (height <= 30) ? height : height - 50;
int newImgWidthDef = (width <= 217) ? width : width - 217;
int newImgHeightDef = (height <= 217) ? height : height - 120;
GdkPixbuf *pixBuf = pixbuf_unscaled;
int newImgHeight = (int)(gdk_pixbuf_get_height(pixBuf) / ((double) gdk_pixbuf_get_width(pixBuf) / newImgWidthDef));
if (newImgHeight > newImgHeightDef) {

Loading…
Cancel
Save