[Goodies-commits] r3368 - ristretto/trunk/src

Stephan Arts stephan at xfce.org
Fri Oct 12 22:08:34 CEST 2007


Author: stephan
Date: 2007-10-12 20:08:33 +0000 (Fri, 12 Oct 2007)
New Revision: 3368

Modified:
   ristretto/trunk/src/picture_viewer.c
Log:
Fix scrollbars when scrolling on an image which is biger then the viewport.


Modified: ristretto/trunk/src/picture_viewer.c
===================================================================
--- ristretto/trunk/src/picture_viewer.c	2007-10-12 20:02:20 UTC (rev 3367)
+++ ristretto/trunk/src/picture_viewer.c	2007-10-12 20:08:33 UTC (rev 3368)
@@ -385,7 +385,7 @@
     GdkPixbuf *tmp_pixbuf = NULL;
     if (viewer->vadjustment && viewer->hadjustment)
     {
-        if (scale < 1.0)
+        if ((width > widget->allocation.width) || (height > widget->allocation.height))
         {
             tmp_pixbuf = gdk_pixbuf_new_subpixbuf(viewer->priv->src_pixbuf,
                                               viewer->hadjustment->value / scale >= 0?
@@ -457,8 +457,8 @@
     RsttoNavigatorEntry *entry = rstto_navigator_get_file(viewer->priv->navigator);
     if (entry)
     {
+        rstto_navigator_entry_set_fit_to_screen (entry, FALSE);
         rstto_navigator_entry_set_scale(entry, scale);
-        rstto_navigator_entry_set_fit_to_screen (entry, FALSE);
 
         if(rstto_picture_viewer_refresh(viewer))
         {




More information about the Goodies-commits mailing list