From 3b1b89462dedba514be8464f3c99ca149e54695a Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Tue, 9 Jul 2024 12:25:46 +0600 Subject: [PATCH] fixes --- source/ubinstall-gtk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index 49d8ffd..4f232d9 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -235,7 +235,7 @@ 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 <= 50) ? height : height - 50; + int newImgHeightDef = (height <= 30) ? height : height - 50; GdkPixbuf *pixBuf = pixbuf_unscaled; int newImgHeight = (int)(gdk_pixbuf_get_height(pixBuf) / ((double) gdk_pixbuf_get_width(pixBuf) / newImgWidthDef)); if (newImgHeight > newImgHeightDef) {