Dear Hermet, Hi! I have refined previous patch based on your opinion. Please refer to bellow comments and attached patch * 1. how about changing the signal names to ones more explicitly ? "elm,state,show,up" "elm,state,show,down" "elm,state,show,right" "elm,state,show,left" I guess hide could be added also later.* -> Names are changed as you mentioned.
*2. _transition_adjust I don't like that name. Since those signals are not only for transitions but also any other actions. How about just _show_signal_emit ?* -> Also changed *3. edje_object_signal_emit(wd->base, "elm,state,show", "elm"); in the _ctxpopup_show function looks useless call. doesnt' it?* -> edje_object_signal_emit(); should be there. The clip part does not come properly without this. Sincerely, Shinwoo Kim. 2011/8/22 cnook <kimci...@gmail.com> > Dear All, Hello! > > The transition effect is added to the ctxpopup when it comes. > Please review the attached patch. Thanks always! > > Sincerely, > Shinwoo Kim. >
Index: src/lib/elc_ctxpopup.c =================================================================== --- src/lib/elc_ctxpopup.c (revision 62716) +++ src/lib/elc_ctxpopup.c (working copy) @@ -539,6 +539,33 @@ } static void +_show_signal_emit(Evas_Object *obj, Elm_Ctxpopup_Direction dir) +{ + Widget_Data *wd; + + wd = elm_widget_data_get(obj); + if (!wd || wd->visible) return; + + switch (dir) + { + case ELM_CTXPOPUP_DIRECTION_UP: + edje_object_signal_emit(wd->base, "elm,state,show,up", "elm"); + break; + case ELM_CTXPOPUP_DIRECTION_LEFT: + edje_object_signal_emit(wd->base, "elm,state,show,left", "elm"); + break; + case ELM_CTXPOPUP_DIRECTION_RIGHT: + edje_object_signal_emit(wd->base, "elm,state,show,right", "elm"); + break; + case ELM_CTXPOPUP_DIRECTION_DOWN: + edje_object_signal_emit(wd->base, "elm,state,show,down", "elm"); + break; + default: + break; + } +} + +static void _sizing_eval(Evas_Object *obj) { Widget_Data *wd; @@ -580,6 +607,7 @@ //Base wd->dir = _calc_base_geometry(obj, &rect); + _show_signal_emit(obj, wd->dir); _update_arrow(obj, wd->dir); _shift_base_by_arrow(wd->arrow, wd->dir, &rect); @@ -805,6 +833,7 @@ evas_object_show(wd->arrow); edje_object_signal_emit(wd->bg, "elm,state,show", "elm"); + edje_object_signal_emit(wd->base, "elm,state,show", "elm"); _sizing_eval(obj); } Index: data/themes/widgets/ctxpopup.edc =================================================================== --- data/themes/widgets/ctxpopup.edc (revision 62716) +++ data/themes/widgets/ctxpopup.edc (working copy) @@ -437,6 +437,7 @@ part { name: "arrow_area_left"; type: RECT; mouse_events: 0; + clip_to: "ctxpopup_clip"; description { state: "default" 0.0; visible: 0; min: 20 0; @@ -454,6 +455,7 @@ part { name: "arrow_area_right"; type: RECT; mouse_events: 0; + clip_to: "ctxpopup_clip"; description { state: "default" 0.0; visible: 0; min: 20 0; @@ -471,6 +473,7 @@ part { name: "arrow_area_up"; type: RECT; mouse_events: 0; + clip_to: "ctxpopup_clip"; description { state: "default" 0.0; visible: 0; min: 0 20; @@ -488,6 +491,7 @@ part { name: "arrow_area_down"; type: RECT; mouse_events: 0; + clip_to: "ctxpopup_clip"; description { state: "default" 0.0; visible: 0; min: 0 20; @@ -506,6 +510,7 @@ type: SWALLOW; mouse_events: 0; scale: 1; + clip_to: "ctxpopup_clip"; dragable { x: 1 1 0; y: 1 1 0; @@ -521,6 +526,7 @@ type: SWALLOW; mouse_events: 0; scale: 1; + clip_to: "ctxpopup_clip"; dragable { x: 1 1 0; y: 1 1 0; @@ -536,6 +542,7 @@ type: SWALLOW; mouse_events: 0; scale: 1; + clip_to: "ctxpopup_clip"; dragable { x: 1 1 0; y: 1 1 0; @@ -551,6 +558,7 @@ type: SWALLOW; mouse_events: 0; scale: 1; + clip_to: "ctxpopup_clip"; dragable { x: 1 1 0; y: 1 1 0; @@ -564,6 +572,7 @@ } part { name: "base"; scale: 1; + clip_to: "ctxpopup_clip"; description { state: "default" 0.0; rel1.offset: -3 -3; rel2.offset: 3 3; @@ -574,6 +583,7 @@ } part { name: "over1"; scale: 1; + clip_to: "ctxpopup_clip"; description { state: "default" 0.0; rel1.to: "base"; rel2.to: "base"; @@ -585,6 +595,7 @@ } part { name: "over2"; scale: 1; + clip_to: "ctxpopup_clip"; description { state: "default" 0.0; rel1.to: "base"; rel2.to: "base"; @@ -595,12 +606,83 @@ } part { name: "elm.swallow.content"; type: SWALLOW; + clip_to: "ctxpopup_clip"; description { state: "default" 0.0; rel1 { to:"base"; offset: 4 4; } rel2 { to:"base"; offset: -5 -5; } } } + part { name: "ctxpopup_clip"; + type: RECT; + description { state: "default" 0.0; + color: 255 255 255 0; + rel1 { to:"base"; relative: 0 0; } + rel2 { to:"base"; relative: 0 1; } + } + description { state: "up" 0.0; + color: 255 255 255 0; + rel1 { to:"arrow_area_down"; relative: 0 1; } + rel2 { to:"arrow_area_down"; relative: 1 1; } + } + description { state: "left" 0.0; + color: 255 255 255 0; + rel1 { to:"arrow_area_right"; relative: 1 0; } + rel2 { to:"arrow_area_right"; relative: 1 1; } + } + description { state: "right" 0.0; + color: 255 255 255 0; + rel1 { to:"arrow_area_left"; relative: 0 0; } + rel2 { to:"arrow_area_left"; relative: 0 1; } + } + description { state: "down" 0.0; + color: 255 255 255 0; + rel1 { to:"arrow_area_up"; relative: 0 0; } + rel2 { to:"arrow_area_up"; relative: 1 0; } + } + description { state: "visible" 0.0; + color: 255 255 255 255; + rel1 { to_x:"arrow_area_left"; to_y:"arrow_area_up"; } + rel2 { to_x:"arrow_area_right"; to_y:"arrow_area_down"; } + } + } } + programs { + program { name: "show"; + signal: "elm,state,show"; + source: "elm"; + action: STATE_SET "visible" 0.0; + transition: LINEAR 1.0; + target: "ctxpopup_clip"; + } + program { name: "up"; + signal: "elm,state,show,up"; + source: "elm"; + action: STATE_SET "up" 0.0; + transition: LINEAR 1.0; + target: "ctxpopup_clip"; + } + program { name: "left"; + signal: "elm,state,show,left"; + source: "elm"; + action: STATE_SET "left" 0.0; + transition: LINEAR 1.0; + target: "ctxpopup_clip"; + } + program { name: "right"; + signal: "elm,state,show,right"; + source: "elm"; + action: STATE_SET "right" 0.0; + transition: LINEAR 1.0; + target: "ctxpopup_clip"; + } + program { name: "down"; + signal: "elm,state,show,down"; + source: "elm"; + action: STATE_SET "down" 0.0; + transition: LINEAR 1.0; + target: "ctxpopup_clip"; + } + } } /////////////////////////////////////////////////////////////////////////////// group { name: "elm/ctxpopup/arrow/default";
------------------------------------------------------------------------------ Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
_______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel