summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@gmail.com>2013-01-14 01:24:53 +0000
committerGustavo Sverzut Barbieri <barbieri@gmail.com>2013-01-14 01:24:53 +0000
commit509342ab8e3c3582c2c2dee4284b3059ffdcb800 (patch)
treee6ab114ebae455472660afb048f3ae2a7ece7a16
parentd1a31e4c875d2a6f3f39483bbd39c2e2fbe8cda1 (diff)
fix elm_thumb usage of edje/elm
really, the problem was not even ethumb, but mixing elm_layout and evas_object with edje. SVN revision: 82740
-rw-r--r--src/lib/elm_thumb.c37
1 files changed, 24 insertions, 13 deletions
diff --git a/src/lib/elm_thumb.c b/src/lib/elm_thumb.c
index 9705f370c..f97fd1902 100644
--- a/src/lib/elm_thumb.c
+++ b/src/lib/elm_thumb.c
@@ -91,15 +91,22 @@ _thumb_ready_inform(Elm_Thumb_Smart_Data *sd,
91 91
92 Elm_Widget_Smart_Data *wd = eo_data_get(sd->obj, ELM_OBJ_WIDGET_CLASS); 92 Elm_Widget_Smart_Data *wd = eo_data_get(sd->obj, ELM_OBJ_WIDGET_CLASS);
93 93
94 evas_object_image_size_get(sd->view, &aw, &ah); 94 if ((sd->is_video) && (sd->thumb.format == ETHUMB_THUMB_EET))
95 evas_object_size_hint_aspect_set 95 {
96 (sd->view, EVAS_ASPECT_CONTROL_BOTH, aw, ah); 96 edje_object_size_min_get(sd->view, &mw, &mh);
97 edje_object_size_min_restricted_calc
98 (sd->view, &mw, &mh, mw, mh);
99 evas_object_size_hint_min_set(sd->view, mw, mh);
100 }
101 else
102 {
103 evas_object_image_size_get(sd->view, &aw, &ah);
104 evas_object_size_hint_aspect_set
105 (sd->view, EVAS_ASPECT_CONTROL_BOTH, aw, ah);
106 }
107
97 elm_layout_content_set 108 elm_layout_content_set
98 (wd->resize_obj, "elm.swallow.content", sd->view); 109 (wd->resize_obj, "elm.swallow.content", sd->view);
99 edje_object_size_min_get(wd->resize_obj, &mw, &mh);
100 edje_object_size_min_restricted_calc
101 (wd->resize_obj, &mw, &mh, mw, mh);
102 evas_object_size_hint_min_set(sd->obj, mw, mh);
103 eina_stringshare_replace(&(sd->thumb.file), thumb_path); 110 eina_stringshare_replace(&(sd->thumb.file), thumb_path);
104 eina_stringshare_replace(&(sd->thumb.key), thumb_key); 111 eina_stringshare_replace(&(sd->thumb.key), thumb_key);
105 elm_layout_signal_emit 112 elm_layout_signal_emit
@@ -746,12 +753,16 @@ _animate_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
746 EINA_SAFETY_ON_TRUE_RETURN(setting >= ELM_THUMB_ANIMATION_LAST); 753 EINA_SAFETY_ON_TRUE_RETURN(setting >= ELM_THUMB_ANIMATION_LAST);
747 754
748 sd->anim_setting = setting; 755 sd->anim_setting = setting;
749 if (setting == ELM_THUMB_ANIMATION_LOOP) 756
750 edje_object_signal_emit(sd->view, "animate_loop", ""); 757 if ((sd->is_video) && (sd->thumb.format == ETHUMB_THUMB_EET))
751 else if (setting == ELM_THUMB_ANIMATION_START) 758 {
752 edje_object_signal_emit(sd->view, "animate", ""); 759 if (setting == ELM_THUMB_ANIMATION_LOOP)
753 else if (setting == ELM_THUMB_ANIMATION_STOP) 760 edje_object_signal_emit(sd->view, "animate_loop", "");
754 edje_object_signal_emit(sd->view, "animate_stop", ""); 761 else if (setting == ELM_THUMB_ANIMATION_START)
762 edje_object_signal_emit(sd->view, "animate", "");
763 else if (setting == ELM_THUMB_ANIMATION_STOP)
764 edje_object_signal_emit(sd->view, "animate_stop", "");
765 }
755} 766}
756 767
757EAPI Elm_Thumb_Animation_Setting 768EAPI Elm_Thumb_Animation_Setting