aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Houston <smhouston88@gmail.com>2017-11-30 16:02:26 -0600
committerStephen Houston <smhouston88@gmail.com>2017-11-30 16:02:26 -0600
commitf56395a2ba69413e1b847cb3899a18ff80498bd0 (patch)
tree7006657f489176f59140cc8cdd5345abf7c7ea74
parentMake the name of the ephoto gadget "Slideshow" (diff)
downloadephoto-f56395a2ba69413e1b847cb3899a18ff80498bd0.tar.gz
Don't show files in fileselector for gadget and keep aspect and don't crop images.
-rw-r--r--src/bin/ephoto_slideshow.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/bin/ephoto_slideshow.c b/src/bin/ephoto_slideshow.c
index f72735b..0d0929a 100644
--- a/src/bin/ephoto_slideshow.c
+++ b/src/bin/ephoto_slideshow.c
@@ -423,10 +423,19 @@ _slideshow_item_get(Ephoto_Slideshow *ss, Ephoto_Entry *entry, Evas_Object *pare
evas_object_data_set(layout, "entry", entry);
image = elm_image_add(parent);
- elm_image_preload_disabled_set(image, EINA_FALSE);
- elm_image_smooth_set(image, EINA_FALSE);
+ if (ss->ephoto->config->movess && !ss->ephoto->gadget)
+ {
+ elm_image_preload_disabled_set(image, EINA_FALSE);
+ elm_image_smooth_set(image, EINA_FALSE);
+ elm_image_fill_outside_set(image, EINA_TRUE);
+ }
+ else if (!ss->ephoto->config->movess || ss->ephoto->gadget)
+ {
+ evas_object_image_load_orientation_set(image, EINA_TRUE);
+ evas_object_image_filled_set(image, EINA_TRUE);
+ evas_object_image_preload(image, EINA_FALSE);
+ }
elm_image_file_set(image, entry->path, group);
- elm_image_fill_outside_set(image, EINA_TRUE);
EPHOTO_EXPAND(image);
EPHOTO_FILL(image);
evas_object_event_callback_add(image, EVAS_CALLBACK_SHOW, _image_shown,
@@ -830,6 +839,7 @@ _gadget_settings(void *data, Evas_Object *obj EINA_UNUSED,
elm_fileselector_expandable_set(fentry, EINA_FALSE);
elm_fileselector_path_set(fentry, ss->ephoto->config->directory);
elm_fileselector_buttons_ok_cancel_set(fentry, EINA_FALSE);
+ elm_fileselector_folder_only_set(fentry, EINA_TRUE);
evas_object_size_hint_weight_set(fentry, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(fentry, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_table_pack(table, fentry, 0, 0, 2, 5);