[Goodies-commits] r2282 - ristretto/trunk/src
Stephan Arts
stephan at xfce.org
Thu Dec 28 17:06:48 CET 2006
Author: stephan
Date: 2006-12-28 16:06:48 +0000 (Thu, 28 Dec 2006)
New Revision: 2282
Modified:
ristretto/trunk/src/picture_viewer.c
Log:
fixed centering of image when resizing picture viewer widget
Modified: ristretto/trunk/src/picture_viewer.c
===================================================================
--- ristretto/trunk/src/picture_viewer.c 2006-12-28 00:54:38 UTC (rev 2281)
+++ ristretto/trunk/src/picture_viewer.c 2006-12-28 16:06:48 UTC (rev 2282)
@@ -78,7 +78,7 @@
viewer->dst_pixbuf = NULL;
gtk_widget_set_redraw_on_allocate(GTK_WIDGET(viewer), TRUE);
- viewer->scale = 1.5;
+ viewer->scale = 1;
viewer->src_pixbuf = gdk_pixbuf_new_from_file("test.png", NULL);
//gint width = gdk_pixbuf_get_width(viewer->src_pixbuf);
@@ -245,8 +245,8 @@
pixbuf,
0,
0,
- 0,
- 0,
+ (widget->allocation.width-gdk_pixbuf_get_width(pixbuf))/2,
+ (widget->allocation.height-gdk_pixbuf_get_height(pixbuf))/2,
gdk_pixbuf_get_width(pixbuf),
gdk_pixbuf_get_height(pixbuf),
GDK_RGB_DITHER_NONE,
More information about the Goodies-commits
mailing list