2004-12-22 Mark McLoughlin <mark@skynet.ie>
* shell/ev-view.c:
(ev_view_best_fit), (ev_view_fit_width): because
get_page_size() returns the scaled page size, we
need to calculate the scale factor relative to
the previous scale factor. Should really just
add get_real_page_size().
+2004-12-22 Mark McLoughlin <mark@skynet.ie>
+
+ * shell/ev-view.c:
+ (ev_view_best_fit), (ev_view_fit_width): because
+ get_page_size() returns the scaled page size, we
+ need to calculate the scale factor relative to
+ the previous scale factor. Should really just
+ add get_real_page_size().
+
2004-12-22 Mark McLoughlin <mark@skynet.ie>
* shell/ev-view.[ch]:
if (width != 0 && height != 0) {
double scale_w, scale_h;
- scale_w = (double)GTK_WIDGET (view)->allocation.width / width;
- scale_h = (double)GTK_WIDGET (view)->allocation.height / height;
+ scale_w = (double)GTK_WIDGET (view)->allocation.width * view->scale / width;
+ scale_h = (double)GTK_WIDGET (view)->allocation.height * view->scale / height;
scale = (scale_w < scale_h) ? scale_w : scale_h;
}
scale = 1.0;
if (width != 0)
- scale = (double)GTK_WIDGET (view)->allocation.width / width;
+ scale = (double)GTK_WIDGET (view)->allocation.width * view->scale / width;
ev_view_zoom (view, scale, FALSE);
}