}
part {
- name: "icon_big";
+ name: "icon_thumbnail";
type: SWALLOW;
clip_to : "masking";
scale: 1;
to: "icon_space";
}
}
+ description {
+ state: "hide" 0.0;
+ inherit: "default" 0.0;
+ visible:0;
+ }
+ }
+
+ part {
+ name: "icon_big";
+ type: SWALLOW;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ align: 0.5 0.5;
+ min : BOX_ICON_SIZE_W BOX_ICON_SIZE_H;
+ max : BOX_ICON_BG_SIZE_W BOX_ICON_BG_SIZE_W;
+ fixed : 1 1;
+ rel1 {
+ relative: 0.5 0.5;
+ to: "icon_space";
+ }
+ rel2 {
+ relative: 0.5 0.5;
+ to: "icon_space";
+ }
+ }
+ description {
+ state: "hide" 0.0;
+ inherit: "default" 0.0;
+ visible:0;
+ }
}
part {
action: STATE_SET "btn_show" 0.0;
target: "button.swallow";
}
+
+ program {
+ name: "thumbnail_show";
+ signal: "thumbnail_show";
+ source: "icon_thumbnail";
+ action: STATE_SET "default" 0.0;
+ target: "icon_thumbnail";
+ }
+
+ program {
+ name: "thumbnail_hide";
+ signal: "thumbnail_hide";
+ source: "icon_thumbnail";
+ action: STATE_SET "hide" 0.0;
+ target: "icon_thumbnail";
+ }
+
+ program {
+ name: "icon_show";
+ signal: "icon_show";
+ source: "icon_big";
+ action: STATE_SET "default" 0.0;
+ target: "icon_big";
+ }
+
+ program {
+ name: "icon_hide";
+ signal: "icon_hide";
+ source: "icon_big";
+ action: STATE_SET "hide" 0.0;
+ target: "icon_big";
+ }
}
}
return noti;
}
-static Evas_Object *_activenoti_create_icon(Evas_Object *parent, notification_h noti)
+static Evas_Object* _activenoti_create_icon(Evas_Object *parent, notification_h noti, int *image_type)
{
DBG("");
retif(noti == NULL || parent == NULL , NULL, "Invalid parameter!");
app_control_h app_control;
retif(noti == NULL || parent == NULL, NULL, "Invalid parameter!");
+ *image_type = 0;
ret = notification_get_image(noti, NOTIFICATION_IMAGE_TYPE_ICON, &tmp);
if (ret == NOTIFICATION_ERROR_NONE && tmp != NULL) {
tmp = NULL;
ret = notification_get_image(noti, NOTIFICATION_IMAGE_TYPE_THUMBNAIL, &tmp);
if (ret == NOTIFICATION_ERROR_NONE && tmp != NULL) {
+ *image_type = 1;
icon_path = strdup(tmp);
if (!icon_path) {
ERR("strdup: %s", tmp);
int btn_cnt = 0;
bool auto_remove = true;
bool current_auto_remove = true;
+ int image_type = 0;
if (s_info.activenoti == NULL) {
ERR("Active notification doesn't exist");
icon = NULL;
}
- icon = _activenoti_create_icon(s_info.layout, s_info.current_noti);
+ icon = elm_object_part_content_unset(s_info.layout, "icon_thumbnail");
+ DBG("icon %p", icon);
+ if (icon != NULL) {
+ evas_object_del(icon);
+ icon = NULL;
+ }
+
+ icon = _activenoti_create_icon(s_info.layout, s_info.current_noti, &image_type);
if (icon != NULL) {
- elm_object_part_content_set(s_info.layout, "icon_big", icon);
+ if (image_type == 0) {
+ elm_object_part_content_set(s_info.layout, "icon_big", icon);
+ elm_object_signal_emit(s_info.layout, "thumbnail_hide", "icon_thumbnail");
+ elm_object_signal_emit(s_info.layout, "icon_show", "icon_big");
+ } else {
+ elm_image_fill_outside_set(icon, EINA_TRUE);
+ elm_object_part_content_set(s_info.layout, "icon_thumbnail", icon);
+ elm_object_signal_emit(s_info.layout, "icon_hide", "icon_big");
+ elm_object_signal_emit(s_info.layout, "thumbnail_show", "icon_thumbnail");
+ }
badge = elm_object_part_content_unset(s_info.layout, "icon_badge");
DBG("badget %p", badge);