Revision: 1716
http://geeqie.svn.sourceforge.net/geeqie/?rev=1716&view=rev
Author: nadvornik
Date: 2009-05-30 20:18:22 +0000 (Sat, 30 May 2009)
Log Message:
-----------
preserve image center over short periods when the "broken image" icon is
displayed
http://sourceforge.net/tracker/?func=detail&aid=2793057&group_id=222125&atid=1054680
Modified Paths:
--------------
trunk/src/pixbuf-renderer.c
Modified: trunk/src/pixbuf-renderer.c
===================================================================
--- trunk/src/pixbuf-renderer.c 2009-05-30 20:04:34 UTC (rev 1715)
+++ trunk/src/pixbuf-renderer.c 2009-05-30 20:18:22 UTC (rev 1716)
@@ -3172,11 +3172,23 @@
gint src_x, src_y;
if (!pr->width || !pr->height) return;
- src_x = pr->x_scroll + pr->vis_width / 2;
- src_y = pr->y_scroll + pr->vis_height / 2;
+ /*
+ * Update norm_center only if the image is bigger than the window.
+ * With this condition the stored center survives also a temporary
display
+ * of the "broken image" icon.
+ */
- pr->norm_center_x = (gdouble)src_x / pr->width;
- pr->norm_center_y = (gdouble)src_y / pr->height;
+ if (pr->width > pr->window_width)
+ {
+ src_x = pr->x_scroll + pr->vis_width / 2;
+ pr->norm_center_x = (gdouble)src_x / pr->width;
+ }
+
+ if (pr->height > pr->window_height)
+ {
+ src_y = pr->y_scroll + pr->vis_height / 2;
+ pr->norm_center_y = (gdouble)src_y / pr->height;
+ }
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com
_______________________________________________
Geeqie-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geeqie-svn