On Fri, Mar 19, 2010 at 2:25 PM, Brian Wang <brian.wang.0...@gmail.com> wrote: > Hello all, > > I think there's some underlying bug in elm_genlist that's causing > residual pixels left on the genlist when scrolling around. Please see > the attached (hopefully, with the PNG disguised in TXT extension!), > captured with unmodified elementary_test's genlist test item. The > patch below will make it happen more easily. I don't know if the > '128' magic number is significant though. What are the possible > causes?
Actually, it is quite easy to reproduce the proble even without modifying elm_genlist.c. Please see the attached source code for reproducing the problem and disguised PNG for showcasing the symptom. > > Thanks in advance. > > > brian > > Index: elm_genlist.c > =================================================================== > --- elm_genlist.c (revision 47311) > +++ elm_genlist.c (working copy) > @@ -1667,7 +1667,8 @@ > double t0, t; > > t0 = ecore_time_get(); > - for (n = 0; (wd->queue) && (n < 128); n++) > + //for (n = 0; (wd->queue) && (n < 128); n++) > + for (n = 0; (wd->queue) && (n < 4); n++) > { > Elm_Genlist_Item *it; > > > > -- > brian > ------------------ > > Cool-Karaoke - The smallest recording studio, in your palm, open-sourced > http://cool-idea.com.tw/ > > iMaGiNaTiOn iS mOrE iMpOrTaNt tHaN kNoWlEdGe > -- brian ------------------ Cool-Karaoke - The smallest recording studio, in your palm, open-sourced http://cool-idea.com.tw/ iMaGiNaTiOn iS mOrE iMpOrTaNt tHaN kNoWlEdGe
#include <Elementary.h> static Elm_Genlist_Item_Class itc1; char *gl_label_get(const void *data, Evas_Object *obj, const char *part) { char buf[256]; snprintf(buf, sizeof(buf), "Item # %i", (int)data); return strdup(buf); } Evas_Object *gl_icon_get(const void *data, Evas_Object *obj, const char *part) { return NULL; } Eina_Bool gl_state_get(const void *data, Evas_Object *obj, const char *part) { return EINA_FALSE; } void gl_del(const void *data, Evas_Object *obj) { } void test_genlist(void *data, Evas_Object *obj, void *event_info) { Evas_Object *win, *bg, *gl, *bx; Elm_Genlist_Item *gli; int i; win = elm_win_add(NULL, "genlist", ELM_WIN_BASIC); elm_win_title_set(win, "Genlist"); elm_win_autodel_set(win, 1); bg = elm_bg_add(win); elm_win_resize_object_add(win, bg); evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_show(bg); bx = elm_box_add(win); evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); elm_win_resize_object_add(win, bx); evas_object_show(bx); gl = elm_genlist_add(win); evas_object_size_hint_weight_set(gl, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(gl, EVAS_HINT_FILL, EVAS_HINT_FILL); elm_box_pack_end(bx, gl); evas_object_show(gl); itc1.item_style = "default"; itc1.func.label_get = gl_label_get; itc1.func.icon_get = gl_icon_get; itc1.func.state_get = gl_state_get; itc1.func.del = gl_del; for (i = 0; i < 100; i++) { gli = elm_genlist_item_append(gl, &itc1, (void *)i/* item data */, NULL/* parent */, ELM_GENLIST_ITEM_NONE, NULL/* func */, (void *)(i * 10)/* func data */); } evas_object_resize(win, 320, 200); evas_object_show(win); } EAPI int elm_main(int argc, char **argv) { test_genlist(0,0,0); elm_run(); elm_shutdown(); return 0; } ELM_MAIN()
PNG ihdr...@ È f¯ü sbitÛáoà textsoftware gnome-screenshotï¿>