[Goodies-commits] r3537 - ristretto/trunk/src
Stephan Arts
stephan at xfce.org
Mon Nov 5 22:42:57 CET 2007
Author: stephan
Date: 2007-11-05 21:42:57 +0000 (Mon, 05 Nov 2007)
New Revision: 3537
Modified:
ristretto/trunk/src/picture_viewer.c
Log:
Fix zoom
Modified: ristretto/trunk/src/picture_viewer.c
===================================================================
--- ristretto/trunk/src/picture_viewer.c 2007-11-05 20:28:12 UTC (rev 3536)
+++ ristretto/trunk/src/picture_viewer.c 2007-11-05 21:42:57 UTC (rev 3537)
@@ -602,13 +602,11 @@
GdkPixbuf *tmp_pixbuf = NULL;
if (viewer->vadjustment && viewer->hadjustment)
{
- if (scale < 1.0)
+ if (1.0)
{
tmp_pixbuf = gdk_pixbuf_new_subpixbuf(viewer->priv->src_pixbuf,
- viewer->hadjustment->value / scale >= 0?
- viewer->hadjustment->value / scale : 0,
- viewer->vadjustment->value / scale >= 0?
- viewer->vadjustment->value / scale : 0,
+ (gint)(viewer->hadjustment->value / scale),
+ viewer->vadjustment->value / scale,
((widget->allocation.width/scale)) < width?
widget->allocation.width/scale:width,
((widget->allocation.height/scale))< height?
@@ -728,6 +726,7 @@
rstto_navigator_entry_set_scale(entry, scale * 1.1);
rstto_navigator_entry_set_fit_to_screen (entry, FALSE);
+
viewer->vadjustment->value = ((viewer->vadjustment->value + event->y) * 1.1) - event->y;
viewer->hadjustment->value = ((viewer->hadjustment->value + event->x) * 1.1) - event->x;
More information about the Goodies-commits
mailing list