Elm: Simplify elm photo size handling.

Also don't carry around a negative size when it's not used.

SVN revision: 51967
This commit is contained in:
Brett Nash 2010-09-08 04:54:46 +00:00
parent 4ab457bce6
commit 0713be0e14
1 changed files with 3 additions and 5 deletions

View File

@ -190,12 +190,10 @@ elm_photo_size_set(Evas_Object *obj, int size)
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
wd->size = size;
if(size >= 0)
_els_smart_icon_scale_size_set(wd->img, size);
else
_els_smart_icon_scale_size_set(wd->img, 0);
wd->size = (size > 0) ? size : 0;
_els_smart_icon_scale_size_set(wd->img, wd->size);
_sizing_eval(obj);
}