forked from enlightenment/efl
elementary/ctxpopup - patched by cnook <kimcinoo@gmail.com>
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. SVN revision: 61462
This commit is contained in:
parent
f63260d300
commit
99dc59bb9d
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue