Enlightenment CVS committal
Author : urandom
Project : e17
Module : libs/etk
Dir : e17/libs/etk/src/lib
Modified Files:
etk_tree_model.c
Log Message:
fixed a bug with the alignment of the text based columns. wasn't really
noticeable when the test included columns with the same length, so variable
length was added to the tree demo
===================================================================
RCS file: /cvs/e/e17/libs/etk/src/lib/etk_tree_model.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -3 -r1.14 -r1.15
--- etk_tree_model.c 28 Jan 2007 22:57:07 -0000 1.14
+++ etk_tree_model.c 29 Jan 2007 02:26:51 -0000 1.15
@@ -355,14 +355,12 @@
static Etk_Bool _text_render(Etk_Tree_Model *model, Etk_Tree_Row *row,
Etk_Geometry geometry, void *cell_data, Evas_Object
*cell_objects[MAX_OBJECTS_PER_MODEL], Evas *evas)
{
char **text_data;
- int th;
if (!(text_data = cell_data) || !cell_objects[0])
return ETK_FALSE;
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_move(cell_objects[0], geometry.x, geometry.y + (geometry.h /
2));
evas_object_show(cell_objects[0]);
return ETK_FALSE;
@@ -376,7 +374,7 @@
if (!cell_objects[0])
return 0;
- evas_object_geometry_get(cell_objects[0], NULL, NULL, &w, NULL);
+ edje_object_size_min_calc(cell_objects[0], &w, NULL);
return w;
}
@@ -413,15 +411,13 @@
{
int *int_data;
char string[256];
- int th;
if (!(int_data = cell_data) || !cell_objects[0])
return ETK_FALSE;
snprintf(string, 255, "%d", *int_data);
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_move(cell_objects[0], geometry.x, geometry.y + (geometry.h /
2));
evas_object_show(cell_objects[0]);
return ETK_FALSE;
@@ -460,15 +456,13 @@
{
double *double_data;
char string[256];
- int th;
if (!(double_data = cell_data) || !model || !cell_objects[0])
return ETK_FALSE;
snprintf(string, 255, "%.2f", *double_data);
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_move(cell_objects[0], geometry.x, geometry.y + (geometry.h /
2));
evas_object_show(cell_objects[0]);
return ETK_FALSE;
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs