redo "active" signalling for zoom effect to be more easily themable
This commit is contained in:
parent
ba54cf5497
commit
d0e3824adf
|
@ -446,7 +446,7 @@ collections {
|
|||
rel2.to: "spacer";
|
||||
rel1.offset: 10 10;
|
||||
rel2.offset: -10 -10;
|
||||
link.base: "mouse,out" "events";
|
||||
link.base: "e,state,inactive" "e";
|
||||
link.transition: LINEAR 0.2;
|
||||
//link.after: "idle";
|
||||
}
|
||||
|
@ -456,7 +456,7 @@ collections {
|
|||
rel1.relative: -0.01 -0.01;
|
||||
rel2.relative: 1.01 1.01;
|
||||
rel2.offset: -1 -1;
|
||||
link.base: "mouse,in" "events";
|
||||
link.base: "e,state,active" "e";
|
||||
link.transition: LINEAR 0.2;
|
||||
}
|
||||
desc { "idle1"; inherit: "default";
|
||||
|
@ -506,13 +506,13 @@ collections {
|
|||
desc {
|
||||
rel1.offset: -9999 -9999;
|
||||
rel2.offset: 9999 9999;
|
||||
color: 255 255 255 200;
|
||||
link.base: "mouse,out" "events";
|
||||
color: 200 200 200 200;
|
||||
link.base: "e,state,inactive" "e";
|
||||
link.transition: LINEAR 0.2;
|
||||
}
|
||||
desc { "active"; inherit: "default";
|
||||
color: 255 255 255 255;
|
||||
link.base: "mouse,in" "events";
|
||||
link.base: "e,state,active" "e";
|
||||
link.transition: LINEAR 0.2;
|
||||
}
|
||||
}
|
||||
|
@ -599,15 +599,11 @@ collections {
|
|||
action: SIGNAL_EMIT "e,action,activate" "e";
|
||||
}
|
||||
program { signal: "mouse,in"; source: "events";
|
||||
action: SIGNAL_EMIT "e,state,active" "e";
|
||||
sequence {
|
||||
action: ACTION_STOP;
|
||||
targets: "idle" "idle2" "idle3" "idle4";
|
||||
}
|
||||
}
|
||||
program { signal: "mouse,out"; source: "events";
|
||||
action: SIGNAL_EMIT "e,state,inactive" "e";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
29
src/zoom.c
29
src/zoom.c
|
@ -99,10 +99,27 @@ _client_mouse_down(E_Client *ec EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *o
|
|||
dm = edje_object_part_swallow_get(obj, "e.swallow.client");
|
||||
}
|
||||
|
||||
static void
|
||||
_client_mouse_out(E_Client *ec EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *ev EINA_UNUSED)
|
||||
{
|
||||
if (current)
|
||||
edje_object_signal_emit(evas_object_smart_parent_get(eina_list_data_get(current)), "e,state,inactive", "e");
|
||||
}
|
||||
|
||||
static void
|
||||
_client_mouse_in(E_Client *ec EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void *ev EINA_UNUSED)
|
||||
{
|
||||
Eina_List *l;
|
||||
Evas_Object *zoom_obj, *m;
|
||||
|
||||
evas_object_raise(obj);
|
||||
m = edje_object_part_swallow_get(obj, "e.swallow.client");
|
||||
if (current && (eina_list_data_get(current) != m))
|
||||
edje_object_signal_emit(evas_object_smart_parent_get(eina_list_data_get(current)), "e,state,inactive", "e");
|
||||
zoom_obj = evas_object_data_get(obj, "__DSZOOMOBJ");
|
||||
l = evas_object_data_get(zoom_obj, "__DSCLIENTS");
|
||||
current = eina_list_data_find_list(l, m);
|
||||
edje_object_signal_emit(obj, "e,state,active", "e");
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -177,12 +194,6 @@ _client_activate(void *data, Evas_Object *obj EINA_UNUSED, const char *sig EINA_
|
|||
_zoom_hide();
|
||||
}
|
||||
|
||||
static void
|
||||
_client_active(void *data EINA_UNUSED, Evas_Object *obj, const char *sig EINA_UNUSED, const char *src EINA_UNUSED)
|
||||
{
|
||||
evas_object_raise(obj);
|
||||
}
|
||||
|
||||
static void
|
||||
_zoomobj_pack_client(const E_Client *ec, const E_Zone *zone, Evas_Object *tb, Evas_Object *m, unsigned int id, unsigned int cols)
|
||||
{
|
||||
|
@ -225,10 +236,10 @@ _zoomobj_add_client(Evas_Object *zoom_obj, Eina_List *l, Evas_Object *m)
|
|||
evas_object_event_callback_add(elm_layout_edje_get(e), EVAS_CALLBACK_MOUSE_DOWN, (Evas_Object_Event_Cb)_client_mouse_down, ec);
|
||||
evas_object_event_callback_add(elm_layout_edje_get(e), EVAS_CALLBACK_MOUSE_UP, (Evas_Object_Event_Cb)_client_mouse_up, ec);
|
||||
evas_object_event_callback_add(elm_layout_edje_get(e), EVAS_CALLBACK_MOUSE_IN, (Evas_Object_Event_Cb)_client_mouse_in, ec);
|
||||
evas_object_event_callback_add(elm_layout_edje_get(e), EVAS_CALLBACK_MOUSE_OUT, (Evas_Object_Event_Cb)_client_mouse_out, ec);
|
||||
if ((!zmw) && (!zmh))
|
||||
edje_object_size_min_calc(elm_layout_edje_get(e), &zmw, &zmh);
|
||||
elm_layout_signal_callback_add(e, "e,action,activate", "e", _client_activate, ec);
|
||||
elm_layout_signal_callback_add(e, "e,state,active", "e", _client_active, ec);
|
||||
if (e_client_focused_get() == ec)
|
||||
{
|
||||
elm_layout_signal_emit(e, "e,state,focused", "e");
|
||||
|
@ -294,8 +305,8 @@ _zoom_key(void *d EINA_UNUSED, int t EINA_UNUSED, Ecore_Event_Key *ev)
|
|||
E_Zone *zone;
|
||||
|
||||
e = evas_object_smart_parent_get(eina_list_data_get(n));
|
||||
edje_object_signal_emit(e, "e,state,focused", "e");
|
||||
edje_object_signal_emit(evas_object_smart_parent_get(eina_list_data_get(current)), "e,state,unfocused", "e");
|
||||
edje_object_signal_emit(e, "e,state,active", "e");
|
||||
edje_object_signal_emit(evas_object_smart_parent_get(eina_list_data_get(current)), "e,state,inactive", "e");
|
||||
current = n;
|
||||
evas_object_geometry_get(e, &x, &y, &w, &h);
|
||||
scr = elm_object_part_content_get(evas_object_data_get(e, "__DSZOOMOBJ"), "e.swallow.layout");
|
||||
|
|
Loading…
Reference in New Issue