Elementary entry: Now really fix min size calculation.

Width shouldn't matter. (look at revision 58393 for more info).

SVN revision: 58410
This commit is contained in:
Tom Hacohen 2011-04-07 08:47:18 +00:00
parent b9518d9381
commit b57382c5ab
1 changed files with 11 additions and 15 deletions

View File

@ -580,20 +580,16 @@ static void
_elm_win_recalc_job(void *data)
{
Widget_Data *wd = elm_widget_data_get(data);
Evas_Coord minw = -1, minh = -1, maxh = -1;
Evas_Coord resw, resh, minminw;
Evas_Coord minh = -1, resw = -1;
if (!wd) return;
wd->deferred_recalc_job = NULL;
evas_object_geometry_get(wd->ent, NULL, NULL, &resw, &resh);
resh = 0;
edje_object_size_min_restricted_calc(wd->ent, &minw, &minh, 0, 0);
elm_coords_finger_size_adjust(1, &minw, 1, &minh);
minminw = minw;
edje_object_size_min_restricted_calc(wd->ent, &minw, &minh, resw, 0);
elm_coords_finger_size_adjust(1, &minw, 1, &minh);
evas_object_size_hint_min_set(data, minminw, minh);
if (wd->single_line) maxh = minh;
evas_object_size_hint_max_set(data, -1, maxh);
evas_object_geometry_get(wd->ent, NULL, NULL, &resw, NULL);
edje_object_size_min_restricted_calc(wd->ent, NULL, &minh, resw, 0);
elm_coords_finger_size_adjust(1, NULL, 1, &minh);
evas_object_size_hint_min_set(data, -1, minh);
if (wd->single_line)
evas_object_size_hint_max_set(data, -1, minh);
if (wd->deferred_cur)
elm_widget_show_region_set(data, wd->cx, wd->cy, wd->cw, wd->ch);
}
@ -602,7 +598,7 @@ static void
_sizing_eval(Evas_Object *obj)
{
Widget_Data *wd = elm_widget_data_get(obj);
Evas_Coord minw = -1, minh = -1, maxw = -1, maxh = -1;
Evas_Coord minw = -1, minh = -1;
Evas_Coord resw, resh;
if (!wd) return;
if ((wd->linewrap) || (wd->char_linewrap))
@ -620,8 +616,8 @@ _sizing_eval(Evas_Object *obj)
edje_object_size_min_calc(wd->ent, &minw, &minh);
elm_coords_finger_size_adjust(1, &minw, 1, &minh);
evas_object_size_hint_min_set(obj, minw, minh);
if (wd->single_line) maxh = minh;
evas_object_size_hint_max_set(obj, maxw, maxh);
if (wd->single_line)
evas_object_size_hint_max_set(obj, -1, minh);
}
}