summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packaging/liblivebox-edje.spec2
-rw-r--r--src/script_port.c53
2 files changed, 33 insertions, 22 deletions
diff --git a/packaging/liblivebox-edje.spec b/packaging/liblivebox-edje.spec
index af4db6b..2e94f3c 100644
--- a/packaging/liblivebox-edje.spec
+++ b/packaging/liblivebox-edje.spec
@@ -1,6 +1,6 @@
Name: liblivebox-edje
Summary: EDJE Script loader for the data provider master
-Version: 0.5.25
+Version: 0.5.26
Release: 1
Group: HomeTF/Livebox
License: Flora License
diff --git a/src/script_port.c b/src/script_port.c
index 3a97b99..c94ddea 100644
--- a/src/script_port.c
+++ b/src/script_port.c
@@ -696,6 +696,34 @@ out:
return LB_STATUS_SUCCESS;
}
+static inline void apply_shadow_effect(struct image_option *img_opt, Evas_Object *img)
+{
+ if (!img_opt->shadow.enabled) {
+ return;
+ }
+
+ /*
+ ea_effect_h *ea_effect;
+ ea_effect = ea_image_effect_create();
+ if (!ea_effect) {
+ return;
+ }
+
+ // -90, 2, 4, 0x99000000
+ ea_image_effect_add_outer_shadow(ea_effect, img_opt->shadow.angle, img_opt->shadow.offset, img_opt->shadow.softness, img_opt->shadow.color);
+ ea_object_image_effect_set(img, ea_effect);
+
+ if (ENGINEER_MODE_ENABLED) {
+ int x, y, w, h;
+ ea_image_effect_offset_get(ea_effect, &x, &y);
+ evas_object_image_size_get(img, &w, &h);
+ DbgPrint("Effect applied (%dx%d) - (%dx%d), (%d,%d,%d,%d)\n", x, y, w, h, img_opt->shadow.angle, img_opt->shadow.offset, img_opt->shadow.softness, img_opt->shadow.color);
+ }
+
+ ea_image_effect_destroy(ea_effect);
+ */
+}
+
PUBLIC int script_update_image(void *_h, Evas *e, const char *id, const char *part, const char *path, const char *option)
{
struct info *handle = _h;
@@ -788,6 +816,8 @@ PUBLIC int script_update_image(void *_h, Evas *e, const char *id, const char *pa
return LB_STATUS_ERROR_IO;
}
+ apply_shadow_effect(&img_opt, img);
+
evas_object_image_size_get(img, &w, &h);
if (img_opt.aspect) {
if (img_opt.fill == FILL_OVER_SIZE) {
@@ -932,6 +962,8 @@ PUBLIC int script_update_image(void *_h, Evas *e, const char *id, const char *pa
evas_object_del(src_img);
ecore_evas_free(ee);
+
+ apply_shadow_effect(&img_opt, img);
}
} else if (img_opt.fill == FILL_IN_SIZE) {
Evas_Coord part_w;
@@ -984,27 +1016,6 @@ PUBLIC int script_update_image(void *_h, Evas *e, const char *id, const char *pa
evas_object_image_filled_set(img, EINA_TRUE);
}
- if (img_opt.shadow.enabled) {
- /*
- ea_effect_h *ea_effect;
-
- ea_effect = ea_image_effect_create();
- if (ea_effect) {
- // -90, 2, 4, 0x99000000
- ea_image_effect_add_outer_shadow(ea_effect, img_opt.shadow.angle, img_opt.shadow.offset, img_opt.shadow.softness, img_opt.shadow.color);
- ea_object_image_effect_set(img, ea_effect);
-
- if (ENGINEER_MODE_ENABLED) {
- int x, y, w, h;
- ea_image_effect_offset_get(ea_effect, &x, &y);
- evas_object_image_size_get(img, &w, &h);
- DbgPrint("Effect applied (%dx%d) - (%dx%d), (%d,%d,%d,%d)\n", x, y, w, h, img_opt.shadow.angle, img_opt.shadow.offset, img_opt.shadow.softness, img_opt.shadow.color);
- }
-
- ea_image_effect_destroy(ea_effect);
- }
- */
- }
/*!
* \note