elementary/ctxpopup - trivial changes.
just modified code style. SVN revision: 61261
This commit is contained in:
parent
ee6c3bffca
commit
398a24a50d
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue