discomfitor pushed a commit to branch enlightenment-0.21.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=b705ac1c9e558a98b1bccb49d6fc8629f6434518

commit b705ac1c9e558a98b1bccb49d6fc8629f6434518
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Fri Aug 4 16:23:38 2017 -0400

    clamp vertical bryce size to useful zone geometry
    
    this should improve layouts when vertical and horizontal layouts are mixed
---
 src/bin/e_bryce.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/bin/e_bryce.c b/src/bin/e_bryce.c
index 00af04e3d..3889b9055 100644
--- a/src/bin/e_bryce.c
+++ b/src/bin/e_bryce.c
@@ -202,7 +202,13 @@ _bryce_autosize(Bryce *b)
    if (!b->autosize)
      {
         if (b->parent == e_comp->elm)
-          w = e_comp_zone_number_get(b->zone)->w, h = 
e_comp_zone_number_get(b->zone)->h;
+          {
+             w = e_comp_zone_number_get(b->zone)->w;
+             if (b->orient == E_GADGET_SITE_ORIENT_VERTICAL)
+               e_zone_useful_geometry_get(e_comp_zone_number_get(b->zone), 
NULL, NULL, NULL, &h);
+             else
+               h = e_comp_zone_number_get(b->zone)->h;
+          }
         else
           evas_object_geometry_get(b->parent, NULL, NULL, &w, &h);
         if (b->size_changed)
@@ -225,7 +231,11 @@ _bryce_autosize(Bryce *b)
         E_Zone *zone;
 
         zone = e_comp_zone_number_get(b->zone);
-        maxw = zone->w, maxh = zone->h;
+        maxw = zone->w;
+        if (b->orient == E_GADGET_SITE_ORIENT_VERTICAL)
+          e_zone_useful_geometry_get(e_comp_zone_number_get(b->zone), NULL, 
NULL, NULL, &maxh);
+        else
+          maxh = zone->h;
      }
    else
      evas_object_geometry_get(b->parent, NULL, NULL, &maxw, &maxh);

-- 


Reply via email to