forked from enlightenment/ephoto
commit c0d355a3438ba4e9c731d190fa292c0eb9acde23
Author: Otavio Pontes <otavio@profusion.mobi> Date: Mon Sep 27 11:32:34 2010 -0300 Fixing some bugs in image exibition. Using photocan to show png files in flow browser and using elm_image instead of elm_bg to display thumbs in thumb_browser. elm_bg was creating a strange border in images with white(or transparent) background. SVN revision: 52902
This commit is contained in:
parent
ad063ce60e
commit
153e9d89d6
|
@ -75,10 +75,9 @@ _ephoto_go_update(Ephoto_Flow_Browser *ef)
|
|||
evas_object_hide(ef->image2);
|
||||
|
||||
file_type = efreet_mime_type_get(ef->cur_image);
|
||||
printf("%s\n", file_type);
|
||||
if (file_type && !strcmp(file_type, "image/jpeg"))
|
||||
{
|
||||
success = elm_photocam_file_set(ef->image, ef->cur_image);
|
||||
success = (elm_photocam_file_set(ef->image, ef->cur_image) == EVAS_LOAD_ERROR_NONE);
|
||||
elm_layout_content_set(ef->flow_browser, "ephoto.flow.swallow", ef->image);
|
||||
evas_object_show(ef->image);
|
||||
} else {
|
||||
|
@ -88,8 +87,6 @@ _ephoto_go_update(Ephoto_Flow_Browser *ef)
|
|||
}
|
||||
if (success)
|
||||
{
|
||||
char *buffer;
|
||||
int length;
|
||||
#ifdef HAVE_LIBEXIF
|
||||
int orientation = 0;
|
||||
|
||||
|
@ -137,11 +134,7 @@ _ephoto_go_update(Ephoto_Flow_Browser *ef)
|
|||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
length = strlen(ef->cur_image) + strlen("Ephoto - ") + 1;
|
||||
buffer = alloca(length);
|
||||
snprintf(buffer, length, "Ephoto - %s", ef->cur_image);
|
||||
elm_win_title_set(em->win, buffer);
|
||||
_ephoto_set_title(ef->cur_image);
|
||||
}
|
||||
|
||||
elm_toolbar_item_unselect_all(ef->toolbar);
|
||||
|
|
|
@ -420,8 +420,8 @@ _ephoto_get_icon(const void *data, Evas_Object *obj, const char *part)
|
|||
evas_object_size_hint_weight_set(thumb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_show(thumb);
|
||||
|
||||
o = elm_bg_add(thumb);
|
||||
elm_bg_file_set(o, etd->thumb_path, NULL);
|
||||
o = elm_image_add(thumb);
|
||||
elm_image_file_set(o, etd->thumb_path, NULL);
|
||||
evas_object_resize(o, 176, 117);
|
||||
|
||||
elm_layout_content_set(thumb, "ephoto.swallow.content", o);
|
||||
|
|
Loading…
Reference in New Issue