[Goodies-commits] r2485 - ristretto/trunk/src
Stephan Arts
stephan at xfce.org
Sun Feb 4 16:39:43 CET 2007
Author: stephan
Date: 2007-02-04 15:39:43 +0000 (Sun, 04 Feb 2007)
New Revision: 2485
Modified:
ristretto/trunk/src/picture_viewer.c
Log:
fix offset bug
Modified: ristretto/trunk/src/picture_viewer.c
===================================================================
--- ristretto/trunk/src/picture_viewer.c 2007-02-04 14:41:09 UTC (rev 2484)
+++ ristretto/trunk/src/picture_viewer.c 2007-02-04 15:39:43 UTC (rev 2485)
@@ -140,13 +140,9 @@
rstto_picture_viewer_size_allocate(GtkWidget *widget, GtkAllocation *allocation)
{
RsttoPictureViewer *viewer = RSTTO_PICTURE_VIEWER(widget);
- gint border_width = 0;//GTK_CONTAINER(widget)->border_width;
+ gint border_width = 0;
widget->allocation = *allocation;
- if(viewer->scale_fts)
- rstto_picture_viewer_set_scale(viewer, 0);
- rstto_picture_viewer_refresh(viewer);
-
if (GTK_WIDGET_REALIZED (widget))
{
gdk_window_move_resize (widget->window,
@@ -155,6 +151,8 @@
allocation->width - border_width * 2,
allocation->height - border_width * 2);
}
+
+ rstto_picture_viewer_refresh(viewer);
}
static void
@@ -383,8 +381,8 @@
tmp_pixbuf = gdk_pixbuf_new_subpixbuf(viewer->src_pixbuf,
viewer->hadjustment->value / viewer->scale >= 0? viewer->hadjustment->value / viewer->scale : 0,
viewer->vadjustment->value / viewer->scale >= 0? viewer->vadjustment->value / viewer->scale : 0,
- ((widget->allocation.width/viewer->scale)+1) < width?widget->allocation.width/viewer->scale+1:width,
- ((widget->allocation.height/viewer->scale)+1)< height?widget->allocation.height/viewer->scale+1:height);
+ ((widget->allocation.width/viewer->scale)) < width?widget->allocation.width/viewer->scale:width,
+ ((widget->allocation.height/viewer->scale))< height?widget->allocation.height/viewer->scale:height);
if(viewer->dst_pixbuf)
{
More information about the Goodies-commits
mailing list