When 'zoom to fit' is clicked, zoom a little less than before so the border of the...
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Fri, 14 Nov 2008 17:51:42 +0000 (17:51 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Fri, 14 Nov 2008 17:51:42 +0000 (17:51 +0000)
git-svn-id: https://synfig.svn.sourceforge.net/svnroot/synfig@2199 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-studio/trunk/src/gtkmm/workarea.cpp

index e42457d..fc6bb84 100644 (file)
@@ -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);