discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=ffef2d0770a0aed2e259370b5b2d4b07dd0051c1
commit ffef2d0770a0aed2e259370b5b2d4b07dd0051c1 Author: Mike Blumenkrantz <zm...@osg.samsung.com> Date: Tue Nov 1 13:01:33 2016 -0400 update luncher aspect hints whenever icon list is modified --- src/modules/luncher/bar.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/src/modules/luncher/bar.c b/src/modules/luncher/bar.c index da38529..2488031 100644 --- a/src/modules/luncher/bar.c +++ b/src/modules/luncher/bar.c @@ -4,6 +4,19 @@ static Evas_Object *current_preview; static Eina_Bool current_preview_menu; static Eina_Bool _bar_icon_preview_show(void *data); +static void +_bar_aspect(Instance *inst) +{ + switch (e_gadget_site_orient_get(e_gadget_site_get(inst->o_main))) + { + case E_GADGET_SITE_ORIENT_VERTICAL: + evas_object_size_hint_aspect_set(inst->o_main, EVAS_ASPECT_CONTROL_BOTH, 1, eina_list_count(inst->icons)); + break; + default: + evas_object_size_hint_aspect_set(inst->o_main, EVAS_ASPECT_CONTROL_BOTH, eina_list_count(inst->icons), 1); + } +} + static Eina_Bool _bar_check_modifiers(Evas_Modifier *modifiers) { @@ -171,6 +184,7 @@ static void _bar_icon_del(Instance *inst, Icon *ic) { inst->icons = eina_list_remove(inst->icons, ic); + _bar_aspect(inst); evas_object_del(ic->o_layout); evas_object_del(ic->o_icon); eina_hash_del_by_data(inst->icons_desktop_hash, ic); @@ -1201,6 +1215,7 @@ _bar_cb_exec_client_prop(void *data EINA_UNUSED, int type EINA_UNUSED, E_Event_C elm_layout_signal_emit(ic->o_layout, buf, "e"); ic->in_order = EINA_FALSE; inst->icons = eina_list_append(inst->icons, ic); + _bar_aspect(inst); } } else @@ -1287,6 +1302,7 @@ _bar_cb_exec_new(void *data EINA_UNUSED, int type, E_Exec_Instance *ex) elm_layout_signal_emit(ic->o_layout, buf, "e"); ic->in_order = EINA_FALSE; inst->icons = eina_list_append(inst->icons, ic); + _bar_aspect(inst); } } return ECORE_CALLBACK_RENEW; @@ -1378,14 +1394,7 @@ _bar_fill(Instance *inst) inst->icons = eina_list_append(inst->icons, ic); } } - switch (e_gadget_site_orient_get(e_gadget_site_get(inst->o_main))) - { - case E_GADGET_SITE_ORIENT_VERTICAL: - evas_object_size_hint_aspect_set(inst->o_main, EVAS_ASPECT_CONTROL_BOTH, 1, eina_list_count(inst->icons)); - break; - default: - evas_object_size_hint_aspect_set(inst->o_main, EVAS_ASPECT_CONTROL_BOTH, eina_list_count(inst->icons), 1); - } + _bar_aspect(inst); } static void --