Updating branch refs/heads/ristretto-0.2
to 94019d787886456a944be9ac1250a57da7017e8e (commit)
from 1f5b673ad353942fdfbd2fc77efd54de933b1e96 (commit)
commit 94019d787886456a944be9ac1250a57da7017e8e
Author: Stephan Arts <[email protected]>
Date: Thu Oct 27 16:53:22 2011 +0200
Solve problem with size-calculation in size_prepared callback
< pixbuf_width = width / height * s_width
should be
> pixbuf_width = width / height * s_height
src/image_viewer.c | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/src/image_viewer.c b/src/image_viewer.c
index 286c61c..254b9fe 100644
--- a/src/image_viewer.c
+++ b/src/image_viewer.c
@@ -1386,7 +1386,11 @@ cb_rstto_image_loader_area_prepared (GdkPixbufLoader
*loader, RsttoImageViewerTr
}
static void
-cb_rstto_image_loader_size_prepared (GdkPixbufLoader *loader, gint width, gint
height, RsttoImageViewerTransaction *transaction)
+cb_rstto_image_loader_size_prepared (
+ GdkPixbufLoader *loader,
+ gint width,
+ gint height,
+ RsttoImageViewerTransaction *transaction)
{
gint s_width = gdk_screen_get_width (default_screen);
gint s_height = gdk_screen_get_height (default_screen);
@@ -1408,12 +1412,18 @@ cb_rstto_image_loader_size_prepared (GdkPixbufLoader
*loader, gint width, gint h
if(((gdouble)width / (gdouble)s_width) < ((gdouble)height /
(gdouble)s_height))
{
transaction->image_scale = (gdouble)s_width / (gdouble)width;
- gdk_pixbuf_loader_set_size (loader, s_width,
(gint)((gdouble)height/(gdouble)width*(gdouble)s_width));
+ gdk_pixbuf_loader_set_size (
+ loader,
+ s_width,
+ (gint)((gdouble)height/(gdouble)width*(gdouble)s_width));
}
else
{
transaction->image_scale = (gdouble)s_height / (gdouble)height;
- gdk_pixbuf_loader_set_size (loader,
(gint)((gdouble)width/(gdouble)height*(gdouble)s_width), s_height);
+ gdk_pixbuf_loader_set_size (
+ loader,
+ (gint)((gdouble)width/(gdouble)height*(gdouble)s_height),
+ s_height);
}
}
else
_______________________________________________
Xfce4-commits mailing list
[email protected]
https://mail.xfce.org/mailman/listinfo/xfce4-commits