From 407eefb3ff2b73de58a1712a68e249a0e8447ec4 Mon Sep 17 00:00:00 2001 From: raster Date: Fri, 23 Mar 2012 07:49:14 +0000 Subject: [PATCH] From: GoUn Lee Subject: [E-devel] [?Patch]elm_?multibutto?nentry bug fix I've attached patch to fix bug in multibuttonentry. When this widget is unfocused, there's no code for making unfocused entry in multibuttonentry. Because of that, when multibuttonentry got focus again, entry couldn't get focus normally. so I've added code to fix this issue. when it's unfocused. Also I removed unused value in resize_button() which is 'padding_inner' git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@69583 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/elc_multibuttonentry.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lib/elc_multibuttonentry.c b/src/lib/elc_multibuttonentry.c index 67d125d..3d96421 100644 --- a/src/lib/elc_multibuttonentry.c +++ b/src/lib/elc_multibuttonentry.c @@ -342,6 +342,9 @@ _set_vis_guidetext(Evas_Object *obj) elm_box_unpack(wd->box, wd->guidetext); elm_box_unpack(wd->box, wd->entry); if (wd->view_state == MULTIBUTTONENTRY_VIEW_SHRINK) return; + + if(!wd->focused) + elm_object_focus_set(wd->entry, EINA_FALSE); if (wd && (!eina_list_count(wd->items)) && wd->guidetext && (!elm_widget_focus_get(obj)) && (!wd->focused) && (!wd->n_str)) @@ -782,7 +785,7 @@ static void _resize_button(Evas_Object *btn, Evas_Coord *realw, Evas_Coord *vieww) { Evas_Coord rw, vw; - Evas_Coord w_text, h_btn, padding_outer, padding_inner = 0; + Evas_Coord w_text, h_btn, padding_outer = 0; Evas_Coord w_btn = 0, button_max_width = 0; const char *size_str; @@ -793,7 +796,7 @@ _resize_button(Evas_Object *btn, Evas_Coord *realw, Evas_Coord *vieww) edje_object_part_geometry_get(btn, "elm.base", NULL, NULL, NULL, &h_btn); edje_object_part_geometry_get(btn, "elm.btn.text", NULL, NULL, &w_text, NULL); edje_object_part_geometry_get(btn, "right.padding", NULL, NULL, &padding_outer, NULL); - w_btn = w_text + 2*padding_outer + 2*padding_inner; + w_btn = w_text + (2 * padding_outer); rw = w_btn; -- 2.7.4