diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index 9257951..ebe1812 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 - 30; + int newImgHeightDef = (height <= 50) ? 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) { @@ -252,18 +252,9 @@ int yon_image_resize_from_container(GtkImage *target, GdkPixbuf *pixbuf_unscaled void on_region_resized(GtkWidget *,main_window *widgets); void on_region_resized(GtkWidget *,main_window *widgets){ int page = gtk_notebook_get_current_page(GTK_NOTEBOOK(widgets->Notebook)); - switch(page){ - case YON_PAGE_INSTALLATION: { yon_image_resize_from_container(GTK_IMAGE(widgets->SlidesImage), widgets->slides_original); - } break; - case YON_PAGE_REGION: { yon_image_resize_from_container(GTK_IMAGE(widgets->RegionImage), widgets->regions_original); - - } break; - case YON_PAGE_KEYBOARD: { yon_image_resize_from_container(GTK_IMAGE(widgets->KeyboardImage), widgets->keyboard_original); - } break; - } } void on_toggle_block(GtkToggleButton *self);