forked from enlightenment/efl
fix min size calc for entryies that got in with entry + scrolled entry
merge. SVN revision: 61553
This commit is contained in:
parent
bc3484f7ae
commit
864c4ae940
|
@ -648,7 +648,7 @@ static void
|
|||
_elm_win_recalc_job(void *data)
|
||||
{
|
||||
Widget_Data *wd = elm_widget_data_get(data);
|
||||
Evas_Coord minh = -1, resw = -1, minw = -1;
|
||||
Evas_Coord minh = -1, resw = -1, minw = -1, fw = 0, fh = 0;
|
||||
if (!wd) return;
|
||||
wd->deferred_recalc_job = NULL;
|
||||
|
||||
|
@ -666,11 +666,39 @@ _elm_win_recalc_job(void *data)
|
|||
evas_object_size_hint_min_get(data, &ominw, NULL);
|
||||
minw = ominw;
|
||||
}
|
||||
evas_object_size_hint_min_set(data, minw, minh);
|
||||
if (wd->single_line)
|
||||
evas_object_size_hint_max_set(data, -1, minh);
|
||||
|
||||
elm_coords_finger_size_adjust(1, &fw, 1, &fh);
|
||||
if (wd->scroll)
|
||||
{
|
||||
Evas_Coord vmw = 0, vmh = 0;
|
||||
|
||||
edje_object_size_min_calc
|
||||
(elm_smart_scroller_edje_object_get(wd->scroller),
|
||||
&vmw, &vmh);
|
||||
if (wd->single_line)
|
||||
{
|
||||
evas_object_size_hint_min_set(data, vmw, minh + vmh);
|
||||
evas_object_size_hint_max_set(data, -1, minh + vmh);
|
||||
}
|
||||
else
|
||||
{
|
||||
evas_object_size_hint_min_set(data, vmw, vmh);
|
||||
evas_object_size_hint_max_set(data, -1, -1);
|
||||
}
|
||||
}
|
||||
else
|
||||
evas_object_size_hint_max_set(data, -1, -1);
|
||||
{
|
||||
if (wd->single_line)
|
||||
{
|
||||
evas_object_size_hint_min_set(data, minw, minh);
|
||||
evas_object_size_hint_max_set(data, -1, minh);
|
||||
}
|
||||
else
|
||||
{
|
||||
evas_object_size_hint_min_set(data, fw, minh);
|
||||
evas_object_size_hint_max_set(data, -1, -1);
|
||||
}
|
||||
}
|
||||
|
||||
if (wd->deferred_cur)
|
||||
{
|
||||
|
|
|
@ -711,8 +711,10 @@ __span_insert(Span *sp, int num, int count, Evas_Coord size, Evas_Coord pos)
|
|||
Span *sp2;
|
||||
int i, j, n, src;
|
||||
|
||||
if (count <= 0) return;
|
||||
if (num < 0) return;
|
||||
next:
|
||||
printf("...... hunt for spot at %p, %i %i\n", sp, count, size * count);
|
||||
// total child count and size go up by what we are inserting
|
||||
sp->total_child_count += count;
|
||||
sp->size += size * count;
|
||||
|
@ -723,11 +725,13 @@ next:
|
|||
{
|
||||
for (n = 0, i = 0; i < sp->child_count; i++)
|
||||
{
|
||||
printf(" look in %i\n", i);
|
||||
sp2 = sp->child[i];
|
||||
n += sp2->total_child_count;
|
||||
// if num is within the child we are looking at
|
||||
if (n > num)
|
||||
{
|
||||
printf(" %i > %i\n", n, num);
|
||||
// advance all children along by size * count
|
||||
for (j = (i + 1); j < sp->child_count; j++)
|
||||
sp->child[j]->pos += (size * count);
|
||||
|
@ -739,6 +743,7 @@ next:
|
|||
}
|
||||
}
|
||||
}
|
||||
printf("FOUND child %p @ %i, %i, cnt %i totcnt %i\n", sp, sp->pos, sp->size, sp->child_count, sp->total_child_count);
|
||||
// now that we are just up from a leaf node... do this
|
||||
if (!sp->child)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue