From a6a0bd2e9ced56dddf826e817932be91635fee1d Mon Sep 17 00:00:00 2001 From: ChunEon Park Date: Tue, 12 Jul 2011 03:26:53 +0000 Subject: [PATCH] elementary/ctxpopup - trivial changes. just modified code style. SVN revision: 61261 --- src/lib/elc_ctxpopup.c | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/src/lib/elc_ctxpopup.c b/src/lib/elc_ctxpopup.c index bd1b787..bba809f 100644 --- a/src/lib/elc_ctxpopup.c +++ b/src/lib/elc_ctxpopup.c @@ -487,20 +487,25 @@ _update_arrow(Evas_Object *obj, Elm_Ctxpopup_Direction dir) edje_object_part_swallow(wd->base, "elm.swallow.arrow_left", wd->arrow); if (base_size.h > 0) { - if (y < (arrow_size.h * 0.5) + base_size.y) y = 0; - 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); + if (y < ((arrow_size.h * 0.5) + base_size.y)) + y = 0; + 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_left", 0.5, (double) (y) / (double) (base_size.h - arrow_size.h)); - } + } break; case ELM_CTXPOPUP_DIRECTION_RIGHT: edje_object_signal_emit(wd->arrow, "elm,state,right", "elm"); edje_object_part_swallow(wd->base, "elm.swallow.arrow_right", wd->arrow); if (base_size.h > 0) { - if (y < (arrow_size.h * 0.5) + base_size.y) y = 0; - else if (y > base_size.y + base_size.h - (arrow_size.h * 0.5)) y = base_size.h - arrow_size.h; + if (y < (arrow_size.h * 0.5) + base_size.y) + y = 0; + 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, (double) (y) / (double) (base_size.h - arrow_size.h)); @@ -511,9 +516,12 @@ _update_arrow(Evas_Object *obj, Elm_Ctxpopup_Direction dir) edje_object_part_swallow(wd->base, "elm.swallow.arrow_up", wd->arrow); if (base_size.w > 0) { - if (x < (arrow_size.w * 0.5) + base_size.x) x = 0; - else if (x > base_size.x + base_size.w - (arrow_size.w * 0.5)) x = base_size.w - arrow_size.w; - else x = x - base_size.x - (arrow_size.w * 0.5); + if (x < (arrow_size.w * 0.5) + base_size.x) + x = 0; + else if (x > (base_size.x + base_size.w - (arrow_size.w * 0.5))) + 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_up", (double) (x) / (double) (base_size.w - arrow_size.w), 0.5); } @@ -523,8 +531,10 @@ _update_arrow(Evas_Object *obj, Elm_Ctxpopup_Direction dir) edje_object_part_swallow(wd->base, "elm.swallow.arrow_down", wd->arrow); if (base_size.w > 0) { - if (x < (arrow_size.w * 0.5) + base_size.x) x = 0; - else if (x > base_size.x + base_size.w - (arrow_size.w * 0.5)) x = base_size.w - arrow_size.w; + if (x < (arrow_size.w * 0.5) + base_size.x) + x = 0; + else if (x > (base_size.x + base_size.w - (arrow_size.w * 0.5))) + 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); -- 2.7.4