From 61f7865f95d31325b9b0c9cfae75231ede7c9d84 Mon Sep 17 00:00:00 2001 From: Woochan Lee Date: Mon, 28 Nov 2016 21:33:42 +0900 Subject: [PATCH] elm_multibuttonentry: Using current w,h value for item size calc when box resized. Summary: Support in case that If the expand mode is set to false and the item is added using the item_append API. Checking focus, entry visible is not needed to change mode in shrink when box resized. If the view type is shrink when the MBE is in focus and the box is resized, it should be in shrink mode. Test Plan: elementary_test MBE sample Reviewers: woohyun, Hermet Subscribers: cedric, jpeg Differential Revision: https://phab.enlightenment.org/D4429 --- src/lib/elementary/elc_multibuttonentry.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/lib/elementary/elc_multibuttonentry.c b/src/lib/elementary/elc_multibuttonentry.c index f9a10b3469..fafe7b3fa2 100644 --- a/src/lib/elementary/elc_multibuttonentry.c +++ b/src/lib/elementary/elc_multibuttonentry.c @@ -1034,14 +1034,12 @@ _box_resize_cb(void *data, } } } - if (sd->view_state == MULTIBUTTONENTRY_VIEW_SHRINK && - !elm_object_focus_get(data) && !evas_object_visible_get(sd->entry)) - { - _shrink_mode_set(data, EINA_TRUE); - } sd->w_box = w; sd->h_box = h; + + if (sd->view_state == MULTIBUTTONENTRY_VIEW_SHRINK) + _shrink_mode_set(data, EINA_TRUE); } static void