diff --git a/legacy/elementary/data/themes/widgets/ctxpopup.edc b/legacy/elementary/data/themes/widgets/ctxpopup.edc index 71affc635b..b97a7558e7 100644 --- a/legacy/elementary/data/themes/widgets/ctxpopup.edc +++ b/legacy/elementary/data/themes/widgets/ctxpopup.edc @@ -417,6 +417,7 @@ group { name: "elm/ctxpopup/bg/default"; source: "elm"; action: STATE_SET "visible" 0.0; target: "ctxpopup_bg"; + transition: LINEAR 0.25; } program { name: "hide"; signal: "elm,state,hide"; @@ -437,6 +438,7 @@ group { name: "elm/ctxpopup/base/default"; 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 +456,7 @@ group { name: "elm/ctxpopup/base/default"; 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 +474,7 @@ group { name: "elm/ctxpopup/base/default"; 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 +492,7 @@ group { name: "elm/ctxpopup/base/default"; 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 +511,7 @@ group { name: "elm/ctxpopup/base/default"; type: SWALLOW; mouse_events: 0; scale: 1; + clip_to: "ctxpopup_clip"; dragable { x: 1 1 0; y: 1 1 0; @@ -521,6 +527,7 @@ group { name: "elm/ctxpopup/base/default"; type: SWALLOW; mouse_events: 0; scale: 1; + clip_to: "ctxpopup_clip"; dragable { x: 1 1 0; y: 1 1 0; @@ -536,6 +543,7 @@ group { name: "elm/ctxpopup/base/default"; type: SWALLOW; mouse_events: 0; scale: 1; + clip_to: "ctxpopup_clip"; dragable { x: 1 1 0; y: 1 1 0; @@ -551,6 +559,7 @@ group { name: "elm/ctxpopup/base/default"; type: SWALLOW; mouse_events: 0; scale: 1; + clip_to: "ctxpopup_clip"; dragable { x: 1 1 0; y: 1 1 0; @@ -564,6 +573,7 @@ group { name: "elm/ctxpopup/base/default"; } part { name: "base"; scale: 1; + clip_to: "ctxpopup_clip"; description { state: "default" 0.0; rel1.offset: -3 -3; rel2.offset: 3 3; @@ -574,6 +584,7 @@ group { name: "elm/ctxpopup/base/default"; } part { name: "over1"; scale: 1; + clip_to: "ctxpopup_clip"; description { state: "default" 0.0; rel1.to: "base"; rel2.to: "base"; @@ -585,6 +596,7 @@ group { name: "elm/ctxpopup/base/default"; } part { name: "over2"; scale: 1; + clip_to: "ctxpopup_clip"; description { state: "default" 0.0; rel1.to: "base"; rel2.to: "base"; @@ -595,11 +607,82 @@ group { name: "elm/ctxpopup/base/default"; } 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 0.25; + target: "ctxpopup_clip"; + } + program { name: "up"; + signal: "elm,state,show,up"; + source: "elm"; + action: STATE_SET "up" 0.0; + transition: LINEAR 0.25; + target: "ctxpopup_clip"; + } + program { name: "left"; + signal: "elm,state,show,left"; + source: "elm"; + action: STATE_SET "left" 0.0; + transition: LINEAR 0.25; + target: "ctxpopup_clip"; + } + program { name: "right"; + signal: "elm,state,show,right"; + source: "elm"; + action: STATE_SET "right" 0.0; + transition: LINEAR 0.25; + target: "ctxpopup_clip"; + } + program { name: "down"; + signal: "elm,state,show,down"; + source: "elm"; + action: STATE_SET "down" 0.0; + transition: LINEAR 0.25; + target: "ctxpopup_clip"; + } } } /////////////////////////////////////////////////////////////////////////////// diff --git a/legacy/elementary/src/lib/elc_ctxpopup.c b/legacy/elementary/src/lib/elc_ctxpopup.c index 5218e0c169..2415640ab5 100644 --- a/legacy/elementary/src/lib/elc_ctxpopup.c +++ b/legacy/elementary/src/lib/elc_ctxpopup.c @@ -538,6 +538,33 @@ _update_arrow(Evas_Object *obj, Elm_Ctxpopup_Direction dir) } } +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) { @@ -580,6 +607,7 @@ _sizing_eval(Evas_Object *obj) //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 @@ _ctxpopup_show(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj, 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); }