Ephoto: Add more transitions for slideshow.
This commit is contained in:
parent
b186c391da
commit
1084841bed
|
@ -405,7 +405,7 @@ collections {
|
|||
}
|
||||
group { name: "ephoto,slideshow,base";
|
||||
data {
|
||||
item: transitions "fade black_fade horizontal vertical square";
|
||||
item: transitions "fade black_fade square";
|
||||
}
|
||||
parts {
|
||||
rect { "background";
|
||||
|
@ -422,6 +422,10 @@ collections {
|
|||
rel2.to: "background";
|
||||
color: 255 255 255 255;
|
||||
}
|
||||
description { state: "fade" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
color: 255 255 255 0;
|
||||
}
|
||||
description { state: "black_fade_init" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
color: 255 255 255 255;
|
||||
|
@ -430,6 +434,10 @@ collections {
|
|||
inherit: "default" 0.0;
|
||||
color: 0 0 0 255;
|
||||
}
|
||||
description { state: "square" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
color: 255 255 255 0;
|
||||
}
|
||||
}
|
||||
rect { "slide_clip2";
|
||||
scale: 1;
|
||||
|
@ -438,6 +446,10 @@ collections {
|
|||
rel2.to: "background";
|
||||
color: 255 255 255 0;
|
||||
}
|
||||
description { state: "fade" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
color: 255 255 255 255;
|
||||
}
|
||||
description { state: "black_fade_init" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
color: 0 0 0 255;
|
||||
|
@ -446,15 +458,17 @@ collections {
|
|||
inherit: "default" 0.0;
|
||||
color: 255 255 255 255;
|
||||
}
|
||||
}
|
||||
swallow { "ephoto.swallow.slideshow.item2";
|
||||
scale: 1;
|
||||
mouse_events: 1;
|
||||
clip_to: "slide_clip2";
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
rel1.to: "slide_clip2";
|
||||
rel2.to: "slide_clip2";
|
||||
description { state: "square_init" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
rel1.relative: 0.5 0.5;
|
||||
rel2.relative: 0.5 0.5;
|
||||
color: 255 255 255 255;
|
||||
}
|
||||
description { state: "square" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
rel1.relative: 0.0 0.0;
|
||||
rel2.relative: 1.0 1.0;
|
||||
color: 255 255 255 255;
|
||||
}
|
||||
}
|
||||
swallow { "ephoto.swallow.slideshow.item";
|
||||
|
@ -467,8 +481,33 @@ collections {
|
|||
rel2.to: "slide_clip";
|
||||
}
|
||||
}
|
||||
swallow { "ephoto.swallow.slideshow.item2";
|
||||
scale: 1;
|
||||
mouse_events: 1;
|
||||
clip_to: "slide_clip2";
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
rel1.to: "slide_clip2";
|
||||
rel2.to: "slide_clip2";
|
||||
}
|
||||
}
|
||||
}
|
||||
programs {
|
||||
program {
|
||||
signal: "ephoto,fade";
|
||||
source: "ephoto";
|
||||
action: STATE_SET "default" 0.0;
|
||||
target: "slide_clip";
|
||||
target: "slide_clip2";
|
||||
after: "fade_2";
|
||||
}
|
||||
program { name: "fade_2";
|
||||
action: STATE_SET "fade" 0.0;
|
||||
target: "slide_clip";
|
||||
target: "slide_clip2";
|
||||
transition: SINUSOIDAL 1.5;
|
||||
after: "end";
|
||||
}
|
||||
program {
|
||||
signal: "ephoto,black_fade";
|
||||
source: "ephoto";
|
||||
|
@ -493,6 +532,28 @@ collections {
|
|||
transition: SINUSOIDAL 0.75;
|
||||
after: "end";
|
||||
}
|
||||
program {
|
||||
signal: "ephoto,square";
|
||||
source: "ephoto";
|
||||
action: STATE_SET "square_init" 0.0;
|
||||
target: "slide_clip2";
|
||||
after: "square_next_2";
|
||||
}
|
||||
program { name: "square_next_2";
|
||||
action: STATE_SET "square" 0.0;
|
||||
target: "slide_clip";
|
||||
target: "slide_clip2";
|
||||
transition: SINUSOIDAL 1.5;
|
||||
after: "end";
|
||||
}
|
||||
program {
|
||||
signal: "ephoto,none";
|
||||
source: "ephoto";
|
||||
action: STATE_SET "fade" 0.0;
|
||||
target: "slide_clip";
|
||||
target: "slide_clip2";
|
||||
after: "end";
|
||||
}
|
||||
program { name: "end";
|
||||
action: SIGNAL_EMIT "ephoto,transition,end" "ephoto";
|
||||
}
|
||||
|
|
|
@ -233,7 +233,7 @@ _config_slideshow(Ephoto *ephoto, Evas_Object *parent)
|
|||
EINA_LIST_FOREACH(transitions, l,
|
||||
transition) elm_hoversel_item_add(hoversel, transition, NULL, 0,
|
||||
_hv_select, transition);
|
||||
elm_hoversel_item_add(hoversel, "None", NULL, 0, _hv_select, NULL);
|
||||
elm_hoversel_item_add(hoversel, "none", NULL, 0, _hv_select, NULL);
|
||||
elm_object_text_set(hoversel, ephoto->config->slideshow_transition);
|
||||
evas_object_size_hint_weight_set(hoversel, EVAS_HINT_EXPAND,
|
||||
EVAS_HINT_EXPAND);
|
||||
|
|
|
@ -217,6 +217,7 @@ static Eina_Bool
|
|||
_slideshow_transition(void *data)
|
||||
{
|
||||
Ephoto_Slideshow *ss = data;
|
||||
char buf[PATH_MAX];
|
||||
|
||||
if (ss->playing == 0)
|
||||
{
|
||||
|
@ -241,7 +242,8 @@ _slideshow_transition(void *data)
|
|||
ss->current_item);
|
||||
evas_object_show(ss->current_item);
|
||||
|
||||
elm_layout_signal_emit(ss->slideshow, "ephoto,black_fade", "ephoto");
|
||||
snprintf(buf, PATH_MAX, "ephoto,%s", ss->ephoto->config->slideshow_transition);
|
||||
elm_layout_signal_emit(ss->slideshow, buf, "ephoto");
|
||||
if (ss->ephoto->config->movess)
|
||||
{
|
||||
elm_layout_signal_emit(ss->current_item, _slideshow_move_start_get(ss), "ephoto");
|
||||
|
@ -268,6 +270,7 @@ _slideshow_play(Ephoto_Slideshow *ss)
|
|||
ss->slideshow);
|
||||
elm_layout_content_set(ss->slideshow, "ephoto.swallow.slideshow.item",
|
||||
ss->current_item);
|
||||
evas_object_raise(ss->current_item);
|
||||
evas_object_show(ss->current_item);
|
||||
}
|
||||
_slideshow_move_randomize(ss);
|
||||
|
|
Loading…
Reference in New Issue