From 920a10496200e474c2ba93978858ff0952428355 Mon Sep 17 00:00:00 2001 From: hermet Date: Mon, 18 Jul 2011 05:07:36 +0000 Subject: [PATCH] elementary/ctxpopup - patched by cnook Hi All, The ctxpopup arrow is attached on the drag-able part. If arrow height/width is smaller than drag-able part, then there is a gap between arrow and ctxpopup base. So this patch comes for resolving this issue. Thanks. Sincerely, Shinwoo Kim. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@61462 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/elc_ctxpopup.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/elc_ctxpopup.c b/src/lib/elc_ctxpopup.c index bba809f..f633437 100644 --- a/src/lib/elc_ctxpopup.c +++ b/src/lib/elc_ctxpopup.c @@ -493,7 +493,7 @@ _update_arrow(Evas_Object *obj, Elm_Ctxpopup_Direction dir) y = base_size.h - arrow_size.h; else y = y - base_size.y - (arrow_size.h * 0.5); - edje_object_part_drag_value_set(wd->base, "elm.swallow.arrow_left", 0.5, + edje_object_part_drag_value_set(wd->base, "elm.swallow.arrow_left", 1, (double) (y) / (double) (base_size.h - arrow_size.h)); } break; @@ -507,7 +507,7 @@ _update_arrow(Evas_Object *obj, Elm_Ctxpopup_Direction dir) else if (y > (base_size.y + base_size.h - (arrow_size.h * 0.5))) y = base_size.h - arrow_size.h; else y = y - base_size.y - (arrow_size.h * 0.5); - edje_object_part_drag_value_set(wd->base, "elm.swallow.arrow_right", 0.5, + edje_object_part_drag_value_set(wd->base, "elm.swallow.arrow_right", 0, (double) (y) / (double) (base_size.h - arrow_size.h)); } break; @@ -523,7 +523,7 @@ _update_arrow(Evas_Object *obj, Elm_Ctxpopup_Direction dir) else x = x - base_size.x - (arrow_size.w * 0.5); edje_object_part_drag_value_set(wd->base, "elm.swallow.arrow_up", - (double) (x) / (double) (base_size.w - arrow_size.w), 0.5); + (double) (x) / (double) (base_size.w - arrow_size.w), 1); } break; case ELM_CTXPOPUP_DIRECTION_DOWN: @@ -537,7 +537,7 @@ _update_arrow(Evas_Object *obj, Elm_Ctxpopup_Direction dir) x = base_size.w - arrow_size.w; else x = x - base_size.x - (arrow_size.w * 0.5); edje_object_part_drag_value_set(wd->base, "elm.swallow.arrow_down", - (double) (x) / (double) (base_size.w - arrow_size.w), 0.5); + (double) (x) / (double) (base_size.w - arrow_size.w), 0); } break; default: -- 2.7.4