From: dooglus Date: Fri, 14 Nov 2008 17:51:42 +0000 (+0000) Subject: When 'zoom to fit' is clicked, zoom a little less than before so the border of the... X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=2b7a4f046ad70e394d392496fb34a448b94f1d92;p=synfig.git When 'zoom to fit' is clicked, zoom a little less than before so the border of the canvas is visible. It wasn't clear that the whole canvas was visible before. git-svn-id: https://synfig.svn.sourceforge.net/svnroot/synfig@2199 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-studio/trunk/src/gtkmm/workarea.cpp b/synfig-studio/trunk/src/gtkmm/workarea.cpp index e42457d..fc6bb84 100644 --- a/synfig-studio/trunk/src/gtkmm/workarea.cpp +++ b/synfig-studio/trunk/src/gtkmm/workarea.cpp @@ -2581,7 +2581,8 @@ studio::WorkArea::zoom_out() void studio::WorkArea::zoom_fit() { - float new_zoom(min(drawing_area->get_width() * zoom / w, drawing_area->get_height() * zoom / h)); + float new_zoom(min(drawing_area->get_width() * zoom / w, + drawing_area->get_height() * zoom / h) * 0.995); if (zoom / new_zoom > 0.995 && new_zoom / zoom > 0.995) { set_zoom(prev_zoom);