fix discomfitors list scalign thing.. was actually image/icon madness.

:)



SVN revision: 72109
This commit is contained in:
Carsten Haitzler 2012-06-14 07:55:55 +00:00
parent dc83c09247
commit c7fad4ef42
2 changed files with 35 additions and 10 deletions

View File

@ -270,7 +270,7 @@ _elm_image_smart_size_get(const Evas_Object *obj,
int *h) int *h)
{ {
int tw, th; int tw, th;
int cw, ch; int cw = 0, ch = 0;
const char *type; const char *type;
ELM_IMAGE_DATA_GET(obj, sd); ELM_IMAGE_DATA_GET(obj, sd);
@ -283,7 +283,9 @@ _elm_image_smart_size_get(const Evas_Object *obj,
else else
evas_object_image_size_get(sd->img, &tw, &th); evas_object_image_size_get(sd->img, &tw, &th);
evas_object_geometry_get(sd->img, NULL, NULL, &cw, &ch); if ((sd->scale_up) || (sd->scale_down))
evas_object_geometry_get(sd->img, NULL, NULL, &cw, &ch);
tw = tw > cw ? tw : cw; tw = tw > cw ? tw : cw;
th = th > ch ? th : ch; th = th > ch ? th : ch;
tw = ((double)tw) * sd->scale; tw = ((double)tw) * sd->scale;
@ -766,6 +768,7 @@ _elm_image_smart_sizing_eval(Evas_Object *obj)
{ {
Evas_Coord minw = -1, minh = -1, maxw = -1, maxh = -1; Evas_Coord minw = -1, minh = -1, maxw = -1, maxh = -1;
int w, h; int w, h;
double ts;
ELM_IMAGE_DATA_GET(obj, sd); ELM_IMAGE_DATA_GET(obj, sd);
@ -780,19 +783,40 @@ _elm_image_smart_sizing_eval(Evas_Object *obj)
ELM_IMAGE_CLASS(ELM_WIDGET_DATA(sd)->api)->scale_set ELM_IMAGE_CLASS(ELM_WIDGET_DATA(sd)->api)->scale_set
(obj, elm_widget_scale_get(obj) * elm_config_scale_get()); (obj, elm_widget_scale_get(obj) * elm_config_scale_get());
ts = sd->scale;
sd->scale = 1.0;
ELM_IMAGE_CLASS(ELM_WIDGET_DATA(sd)->api)->size_get(obj, &w, &h); ELM_IMAGE_CLASS(ELM_WIDGET_DATA(sd)->api)->size_get(obj, &w, &h);
sd->scale = ts;
if (!sd->scale_down) if (sd->no_scale)
{ {
minw = w; maxw = minw = w;
minh = h; maxh = minh = h;
if ((sd->scale > 1.0) && (sd->scale_up))
{
maxw = minw = w * sd->scale;
maxh = minh = h * sd->scale;
}
else if ((sd->scale < 1.0) && (sd->scale_down))
{
maxw = minw = w * sd->scale;
maxh = minh = h * sd->scale;
}
} }
if (!sd->scale_up) else
{ {
maxw = w; if (!sd->scale_down)
maxh = h; {
minw = w * sd->scale;
minh = h * sd->scale;
}
if (!sd->scale_up)
{
maxw = w * sd->scale;
maxh = h * sd->scale;
}
} }
evas_object_size_hint_min_set(obj, minw, minh); evas_object_size_hint_min_set(obj, minw, minh);
evas_object_size_hint_max_set(obj, maxw, maxh); evas_object_size_hint_max_set(obj, maxw, maxh);
} }

View File

@ -633,7 +633,7 @@ _theme_hook(Evas_Object *obj)
elm_smart_scroller_object_theme_set(obj, wd->scr, "list", "base", elm_smart_scroller_object_theme_set(obj, wd->scr, "list", "base",
elm_widget_style_get(obj)); elm_widget_style_get(obj));
// edje_object_scale_set(wd->scr, elm_widget_scale_get(obj) * _elm_config->scale); edje_object_scale_set(wd->scr, elm_widget_scale_get(obj) * _elm_config->scale);
edj = elm_smart_scroller_edje_object_get(wd->scr); edj = elm_smart_scroller_edje_object_get(wd->scr);
str = edje_object_data_get(edj, "focus_highlight"); str = edje_object_data_get(edj, "focus_highlight");
if ((str) && (!strcmp(str, "on"))) if ((str) && (!strcmp(str, "on")))
@ -1309,6 +1309,7 @@ _fix_items(Evas_Object *obj)
wd->minh[1] = minh[1]; wd->minh[1] = minh[1];
redo = 1; redo = 1;
} }
i = 0; i = 0;
EINA_LIST_FOREACH(wd->items, l, it) EINA_LIST_FOREACH(wd->items, l, it)
{ {