summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLarry Jr <larry.olj@gmail.com>2017-11-16 18:09:57 -0200
committerLarry Jr <larry.olj@gmail.com>2017-11-16 18:09:57 -0200
commit96d2100e8fc7b63337502eefb6fbad736372bf35 (patch)
tree819a46d473e16a21923f19e97a6af1fc18a6952a
parent5fa38276fef71272d7cda8a13c498a328224848f (diff)
downloadefl-96d2100e8fc7b63337502eefb6fbad736372bf35.tar.gz
elm: fixed clip and position in efl-ui-list item
-rw-r--r--src/lib/elementary/efl_ui_list.c1
-rw-r--r--src/lib/elementary/efl_ui_list_precise_layouter.c13
2 files changed, 5 insertions, 9 deletions
diff --git a/src/lib/elementary/efl_ui_list.c b/src/lib/elementary/efl_ui_list.c
index 4151a36ca7..4addef1d99 100644
--- a/src/lib/elementary/efl_ui_list.c
+++ b/src/lib/elementary/efl_ui_list.c
@@ -1479,6 +1479,7 @@ _efl_ui_list_efl_ui_list_model_realize(Eo *obj, Efl_Ui_List_Data *pd, Efl_Ui_Lis
item->layout = efl_ui_factory_create(pd->factory, item->children, obj);
// elm_widget_sub_object_add(obj, item->layout);
+ evas_object_smart_member_add(item->layout, pd->pan_obj);
// evas_object_event_callback_del_full(item->layout, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _on_item_size_hint_change, item);
efl_ui_view_model_set(item->layout, item->children);
diff --git a/src/lib/elementary/efl_ui_list_precise_layouter.c b/src/lib/elementary/efl_ui_list_precise_layouter.c
index 3ce1189b0f..cb907b865c 100644
--- a/src/lib/elementary/efl_ui_list_precise_layouter.c
+++ b/src/lib/elementary/efl_ui_list_precise_layouter.c
@@ -440,7 +440,6 @@ _calc_size_job(void *data)
pd->calc_job = NULL;
evas_object_smart_changed(pd->modeler);
- //_efl_ui_list_relayout_layout_do(pd);
}
EOLIAN static Efl_Object *
@@ -492,7 +491,6 @@ _efl_ui_list_relayout_layout_do(Efl_Ui_List_Precise_Layouter_Data *pd)
int i, j = 0;
_calc_range(pd);
-// _relayout_calc(pd);
int boxx, boxy, boxw, boxh, extra = 0, rounding = 0;
int boxl = 0, boxr = 0, boxt = 0, boxb = 0;
@@ -542,13 +540,10 @@ _efl_ui_list_relayout_layout_do(Efl_Ui_List_Precise_Layouter_Data *pd)
layout_item = (Efl_Ui_List_LayoutItem *)items_node->pointers[j];
double x, y, w, h;
double weight_x, weight_y;
-// double align[2];
-// int item_pad[4];
-// Eina_Size2D max;
if(layout_item->min.w && layout_item->min.h)
{
-// DBG("size information for item %d width %d height %d", j, layout_item->min.w, layout_item->min.h);
+// DBG("size information for item %d width %d height %d", j, layout_item->min.w, layout_item->min.h);
if(!layout_item->layout)
{
DBG("realizing showing item\n");
@@ -565,7 +560,7 @@ _efl_ui_list_relayout_layout_do(Efl_Ui_List_Precise_Layouter_Data *pd)
rounding = 1;
x = layout_item->pos.x;
- y = layout_item->pos.x + cur_pos;
+ y = layout_item->pos.y + cur_pos;
w = layout_item->size.w;
h = layout_item->size.h + rounding + weight_y * extra;
cur_pos += h;
@@ -573,9 +568,9 @@ _efl_ui_list_relayout_layout_do(Efl_Ui_List_Precise_Layouter_Data *pd)
if (w < pd->min.w) w = pd->min.w;
if (w > ow) w = ow;
- // DBG("------- x=%0.f, y=%0.f, w=%0.f, h=%0.f --- ", x, y, w, h);
+ //DBG("------- x=%0.f, y=%0.f, w=%0.f, h=%0.f --- ", x, y, w, h);
evas_object_geometry_set(layout_item->layout, (x + 0 - scr_x), (y + 0 - scr_y), w, h);
- } /* if (size) end */
+ } /* if (size) end */
}
}
else if (nodedata->realized) // unrealize