okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=1084841bed3717e221d6885d1338c0a96814a100

commit 1084841bed3717e221d6885d1338c0a96814a100
Author: Stephen okra Houston <[email protected]>
Date:   Fri Jul 22 12:10:15 2016 -0500

    Ephoto: Add more transitions for slideshow.
---
 data/themes/ephoto.edc     | 79 ++++++++++++++++++++++++++++++++++++++++------
 src/bin/ephoto_config.c    |  2 +-
 src/bin/ephoto_slideshow.c |  5 ++-
 3 files changed, 75 insertions(+), 11 deletions(-)

diff --git a/data/themes/ephoto.edc b/data/themes/ephoto.edc
index 4c6eddb..fb12a43 100644
--- a/data/themes/ephoto.edc
+++ b/data/themes/ephoto.edc
@@ -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,30 +458,57 @@ collections {
                inherit: "default" 0.0;
                color: 255 255 255 255;
             }
+            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.item2";
+         swallow { "ephoto.swallow.slideshow.item";
             scale: 1;
             mouse_events: 1;
-            clip_to: "slide_clip2";
+            clip_to: "slide_clip";
             description {
                state: "default" 0.0;
-               rel1.to: "slide_clip2";
-               rel2.to: "slide_clip2";
+               rel1.to: "slide_clip";
+               rel2.to: "slide_clip";
             }
          }
-         swallow { "ephoto.swallow.slideshow.item";
+         swallow { "ephoto.swallow.slideshow.item2";
             scale: 1;
             mouse_events: 1;
-            clip_to: "slide_clip";
+            clip_to: "slide_clip2";
             description {
                state: "default" 0.0;
-               rel1.to: "slide_clip";
-               rel2.to: "slide_clip";
+               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";
             action: STATE_SET "black_fade_init" 0.0;
@@ -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";
          }
diff --git a/src/bin/ephoto_config.c b/src/bin/ephoto_config.c
index 6511b58..e939d31 100644
--- a/src/bin/ephoto_config.c
+++ b/src/bin/ephoto_config.c
@@ -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);
diff --git a/src/bin/ephoto_slideshow.c b/src/bin/ephoto_slideshow.c
index bf657b0..e608123 100644
--- a/src/bin/ephoto_slideshow.c
+++ b/src/bin/ephoto_slideshow.c
@@ -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);

-- 


Reply via email to