Enlightenment CVS committal Author : urandom Project : e17 Module : libs/etk
Dir : e17/libs/etk/src/lib Modified Files: etk_tree_model.c Log Message: tree text is themeable =================================================================== RCS file: /cvs/e/e17/libs/etk/src/lib/etk_tree_model.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -3 -r1.12 -r1.13 --- etk_tree_model.c 16 Jan 2007 23:49:26 -0000 1.12 +++ etk_tree_model.c 28 Jan 2007 19:30:11 -0000 1.13 @@ -346,10 +346,8 @@ if (!evas) return; - cell_objects[0] = evas_object_text_add(evas); - /* TODO: make the font themable... */ - evas_object_text_font_set(cell_objects[0], "Vera", 10); - evas_object_color_set(cell_objects[0], 0, 0, 0, 255); + cell_objects[0] = edje_object_add(evas); + etk_theme_edje_object_set_from_parent(cell_objects[0], "text", ETK_WIDGET(model->tree)); evas_object_pass_events_set(cell_objects[0], 1); } @@ -362,8 +360,8 @@ if (!(text_data = cell_data) || !cell_objects[0]) return ETK_FALSE; - evas_object_text_text_set(cell_objects[0], *text_data); - evas_object_geometry_get(cell_objects[0], NULL, NULL, NULL, &th); + edje_object_part_text_set(cell_objects[0], "etk.text.text", *text_data); + edje_object_size_min_get(cell_objects[0], NULL, &th); evas_object_move(cell_objects[0], geometry.x, geometry.y + ((geometry.h - th) / 2)); evas_object_show(cell_objects[0]); @@ -421,8 +419,8 @@ return ETK_FALSE; snprintf(string, 255, "%d", *int_data); - evas_object_text_text_set(cell_objects[0], string); - evas_object_geometry_get(cell_objects[0], NULL, NULL, NULL, &th); + edje_object_part_text_set(cell_objects[0], "etk.text.text", string); + edje_object_size_min_get(cell_objects[0], NULL, &th); evas_object_move(cell_objects[0], geometry.x, geometry.y + ((geometry.h - th) / 2)); evas_object_show(cell_objects[0]); @@ -468,8 +466,8 @@ return ETK_FALSE; snprintf(string, 255, "%.2f", *double_data); - evas_object_text_text_set(cell_objects[0], string); - evas_object_geometry_get(cell_objects[0], NULL, NULL, NULL, &th); + edje_object_part_text_set(cell_objects[0], "etk.text.text", string); + edje_object_size_min_get(cell_objects[0], NULL, &th); evas_object_move(cell_objects[0], geometry.x, geometry.y + ((geometry.h - th) / 2)); evas_object_show(cell_objects[0]); ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs