aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Houston <smhouston88@gmail.com>2017-11-30 16:23:27 -0600
committerStephen Houston <smhouston88@gmail.com>2017-11-30 16:23:27 -0600
commitced5750c9b44b7bfeabe02e1cc940c29291cd29d (patch)
treef26e8b097d1f58ef4248ad0765b9cba00eff4f0e
parentDon't show files in fileselector for gadget and keep aspect and don't crop im... (diff)
downloadephoto-ced5750c9b44b7bfeabe02e1cc940c29291cd29d.tar.gz
Improve slideshow gadget theme
-rw-r--r--data/themes/ephoto.edc32
-rw-r--r--src/bin/ephoto_main.c2
-rw-r--r--src/bin/ephoto_slideshow.c4
3 files changed, 37 insertions, 1 deletions
diff --git a/data/themes/ephoto.edc b/data/themes/ephoto.edc
index b0a3df4..d8b2a87 100644
--- a/data/themes/ephoto.edc
+++ b/data/themes/ephoto.edc
@@ -40,6 +40,10 @@ collections {
state: "default" 0.0;
color: 0 0 0 255;
}
+ description {
+ state: "gadget" 0.0;
+ color: 115 115 115 45;
+ }
}
rect { "slide_clip";
scale: 1;
@@ -120,6 +124,18 @@ collections {
}
programs {
program {
+ signal: "gadget";
+ source: "ephoto";
+ action: STATE_SET "gadget" 0.0;
+ target: "background";
+ }
+ program {
+ signal: "default";
+ source: "ephoto";
+ action: STATE_SET "default" 0.0;
+ target: "background";
+ }
+ program {
signal: "ephoto,fade";
source: "ephoto";
action: STATE_SET "default" 0.0;
@@ -330,6 +346,10 @@ collections {
state: "default" 0.0;
color: 0 0 0 255;
}
+ description {
+ state: "gadget" 0.0;
+ color: 0 0 0 0;
+ }
}
rect { "slide_clip";
scale: 1;
@@ -669,6 +689,18 @@ collections {
}
programs {
program {
+ signal: "gadget";
+ source: "ephoto";
+ action: STATE_SET "gadget" 0.0;
+ target: "background";
+ }
+ program {
+ signal: "default";
+ source: "ephoto";
+ action: STATE_SET "default" 0.0;
+ target: "background";
+ }
+ program {
signal: "ephoto,slideshow,move,left,to,right";
source: "ephoto";
script {
diff --git a/src/bin/ephoto_main.c b/src/bin/ephoto_main.c
index 0dcea9f..9b5e6ed 100644
--- a/src/bin/ephoto_main.c
+++ b/src/bin/ephoto_main.c
@@ -400,7 +400,7 @@ ephoto_window_add(const char *path, int gadget)
ephoto->win = elm_win_add(NULL, "ephoto", ELM_WIN_BASIC);
elm_win_title_set(ephoto->win, "Ephoto");
elm_win_alpha_set(ephoto->win, 1);
- evas_object_size_hint_aspect_set(ephoto->win, EVAS_ASPECT_CONTROL_BOTH, 1, 1);
+ evas_object_size_hint_aspect_set(ephoto->win, EVAS_ASPECT_CONTROL_BOTH, 1,1);
}
if (!ephoto->win)
{
diff --git a/src/bin/ephoto_slideshow.c b/src/bin/ephoto_slideshow.c
index 0d0929a..fd57277 100644
--- a/src/bin/ephoto_slideshow.c
+++ b/src/bin/ephoto_slideshow.c
@@ -418,6 +418,8 @@ _slideshow_item_get(Ephoto_Slideshow *ss, Ephoto_Entry *entry, Evas_Object *pare
layout = elm_layout_add(parent);
elm_layout_file_set(layout, PACKAGE_DATA_DIR "/themes/ephoto.edj",
"ephoto,slideshow,item");
+ if (ss->ephoto->gadget)
+ elm_layout_signal_emit(layout, "gadget", "ephoto");
EPHOTO_EXPAND(layout);
EPHOTO_FILL(layout);
evas_object_data_set(layout, "entry", entry);
@@ -1076,6 +1078,8 @@ ephoto_slideshow_add(Ephoto *ephoto, Evas_Object *parent)
elm_layout_file_set(slideshow, PACKAGE_DATA_DIR "/themes/ephoto.edj",
"ephoto,slideshow,base");
+ if (ephoto->gadget)
+ elm_layout_signal_emit(slideshow, "gadget", "ephoto");
evas_object_event_callback_add(slideshow, EVAS_CALLBACK_DEL, _slideshow_del,
ss);
if (!ephoto->gadget)