rimmed pushed a commit to branch master. http://git.enlightenment.org/tools/eflete.git/commit/?id=20888e20c1b6b0d7b5625f7a85c83ee18b8d686e
commit 20888e20c1b6b0d7b5625f7a85c83ee18b8d686e Author: Vyacheslav Reutskiy <[email protected]> Date: Wed Jul 27 13:57:27 2016 +0300 workspace: fix container fit behavior @fix Change-Id: I9bec72198b0b4a3cc50a0cd2e696265a59a486d3 --- src/bin/ui/workspace/workspace.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/bin/ui/workspace/workspace.c b/src/bin/ui/workspace/workspace.c index 9b0c0d3..ba2ae37 100644 --- a/src/bin/ui/workspace/workspace.c +++ b/src/bin/ui/workspace/workspace.c @@ -1947,8 +1947,9 @@ void workspace_container_fit(Evas_Object *obj) { int w, h; - double zoom; + double zoom, c_zoom; int r, t, l, b; + int base_con, base_works; Scroll_Area *area; const Container_Geom *geom; @@ -1961,11 +1962,15 @@ workspace_container_fit(Evas_Object *obj) evas_object_geometry_get(area->bg, NULL, NULL, &w, &h); geom = container_geom_get(area->container); container_padding_size_get(area->container, &r, &t, &l, &b); + c_zoom = workspace_zoom_factor_get(obj); - if (geom->w >= geom->h) - zoom = (w - l - r) / (double)geom->w; + if (geom->w == geom->h) + base_con = geom->w; else - zoom = (h - t - b) / (double)geom->h; + base_con = (geom->w > geom->h) ? geom->w : geom->h; + base_works = (w >= h) ? h : w; + + zoom = (base_works - l * 3) / ((double)base_con / c_zoom); workspace_zoom_factor_set(obj, zoom); } --
