aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2017-08-04 16:23:38 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2017-08-18 16:51:02 -0400
commitb705ac1c9e558a98b1bccb49d6fc8629f6434518 (patch)
treea3fe6722a06edef40ead73b5c7e461e47f3bc75e
parentdo not reposition new bryces after using editor (diff)
downloadenlightenment-b705ac1c9e558a98b1bccb49d6fc8629f6434518.tar.gz
clamp vertical bryce size to useful zone geometry
this should improve layouts when vertical and horizontal layouts are mixed
-rw-r--r--src/bin/e_bryce.c14
1 files 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);