gedit r6101 - branches/printing/gedit



Author: pborelli
Date: Sat Jan 19 13:50:11 2008
New Revision: 6101
URL: http://svn.gnome.org/viewvc/gedit?rev=6101&view=rev

Log:
fix buglet in fit_to_size


Modified:
   branches/printing/gedit/gedit-print-preview.c

Modified: branches/printing/gedit/gedit-print-preview.c
==============================================================================
--- branches/printing/gedit/gedit-print-preview.c	(original)
+++ branches/printing/gedit/gedit-print-preview.c	Sat Jan 19 13:50:11 2008
@@ -267,13 +267,13 @@
 	if ((priv->orientation == GTK_PAGE_ORIENTATION_LANDSCAPE) ||
 	    (priv->orientation == GTK_PAGE_ORIENTATION_REVERSE_LANDSCAPE))
 	{
-		zoomx = MAX (1, priv->tile_w - 2 * PAGE_PAD) / get_paper_height (preview);
-		zoomy = MAX (1, priv->tile_h - 2 * PAGE_PAD) / get_paper_width (preview);
+		zoomx = MAX (1, width - 2 * PAGE_PAD) / get_paper_height (preview);
+		zoomy = MAX (1, height - 2 * PAGE_PAD) / get_paper_width (preview);
 	}
 	else
 	{
-		zoomx = MAX (1, priv->tile_w - 2 * PAGE_PAD) / get_paper_width (preview);
-		zoomy = MAX (1, priv->tile_h - 2 * PAGE_PAD) / get_paper_height (preview);
+		zoomx = MAX (1, width - 2 * PAGE_PAD) / get_paper_width (preview);
+		zoomy = MAX (1, height - 2 * PAGE_PAD) / get_paper_height (preview);
 	}
 
 	if (zoomx <= zoomy)
@@ -289,7 +289,7 @@
 		priv->scale = zoomy;
 	}
 
-	gtk_widget_queue_draw (priv->layout);
+	update_layout_size (preview);
 }
 
 #define ZOOM_IN_FACTOR (1.2)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]