Enlightenment CVS committal Author : titan Project : e17 Module : proto
Dir : e17/proto/ephoto/src Modified Files: ephoto_callbacks.c ephoto_viewer.c Log Message: More work on thumbnails. Now they are proportional and look better. =================================================================== RCS file: /cvs/e/e17/proto/ephoto/src/ephoto_callbacks.c,v retrieving revision 1.26 retrieving revision 1.27 diff -u -3 -r1.26 -r1.27 --- ephoto_callbacks.c 23 Sep 2006 14:19:02 -0000 1.26 +++ ephoto_callbacks.c 24 Sep 2006 14:25:27 -0000 1.27 @@ -136,13 +136,14 @@ { FILE *file_ptr; const char *dir; - char *image; + char *image_path; char full_path[PATH_MAX]; char text[PATH_MAX]; Ecore_List *ls; Ecore_List *images; Ewl_Widget *shadow; - Ewl_Widget *icon; + Ewl_Widget *image; + Ewl_Widget *cell; ls = ecore_list_new(); images = ecore_list_new(); @@ -204,23 +205,30 @@ } while(!ecore_list_is_empty(images)) { - image = ecore_list_remove_first(images); - ecore_dlist_append(current_thumbs, image); + image_path = ecore_list_remove_first(images); + ecore_dlist_append(current_thumbs, image_path); shadow = ewl_shadow_new(); ewl_container_child_append(EWL_CONTAINER(m->viewer_freebox), shadow); - ewl_object_minimum_size_set(EWL_OBJECT(shadow), 124, 124); - ewl_object_maximum_size_set(EWL_OBJECT(shadow), 124, 124); + ewl_object_minimum_size_set(EWL_OBJECT(shadow), 125, 105); + ewl_object_maximum_size_set(EWL_OBJECT(shadow), 125, 105); ewl_widget_show(shadow); - icon = ewl_image_thumbnail_new(); - ewl_image_thumbnail_request(EWL_IMAGE_THUMBNAIL(icon), image); - ewl_container_child_append(EWL_CONTAINER(shadow), icon); - ewl_image_size_set(EWL_IMAGE(icon), 100, 100); - ewl_theme_data_str_set(icon, "/image_thumbnail/group", + cell = ewl_cell_new(); + ewl_container_child_append(EWL_CONTAINER(shadow), cell); + ewl_object_minimum_size_set(EWL_OBJECT(cell), 100, 85); + ewl_object_maximum_size_set(EWL_OBJECT(cell), 100, 85); + ewl_theme_data_str_set(cell, "/cell/group", ewl_theme_data_str_get(m->entry, "group")); - ewl_callback_append(icon, EWL_CALLBACK_CLICKED, view_images, image); - ewl_widget_show(icon); + ewl_callback_append(cell, EWL_CALLBACK_CLICKED, view_images, image_path); + ewl_widget_show(cell); + + image = ewl_image_thumbnail_new(); + ewl_image_thumbnail_request(EWL_IMAGE_THUMBNAIL(image), image_path); + ewl_container_child_append(EWL_CONTAINER(cell), image); + ewl_image_size_set(EWL_IMAGE(image), 97, 83); + ewl_image_proportional_set(EWL_IMAGE(image), TRUE); + ewl_widget_show(image); } ecore_list_destroy(ls); ecore_list_destroy(images); =================================================================== RCS file: /cvs/e/e17/proto/ephoto/src/ephoto_viewer.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- ephoto_viewer.c 23 Sep 2006 14:19:02 -0000 1.2 +++ ephoto_viewer.c 24 Sep 2006 14:25:27 -0000 1.3 @@ -35,6 +35,7 @@ Ewl_Widget *image; Ewl_Widget *shadow; Ewl_Widget *vbox; + Ewl_Widget *cell; Ecore_List *view_thumbs; view_thumbs = current_thumbs; @@ -92,19 +93,27 @@ while (ecore_dlist_current(view_thumbs)) { current_image = ecore_dlist_current(view_thumbs); + shadow = ewl_shadow_new(); ewl_container_child_append(EWL_CONTAINER(freebox), shadow); - ewl_object_minimum_size_set(EWL_OBJECT(shadow), 65, 65); - ewl_object_maximum_size_set(EWL_OBJECT(shadow), 65, 65); + ewl_object_minimum_size_set(EWL_OBJECT(shadow), 66, 66); + ewl_object_maximum_size_set(EWL_OBJECT(shadow), 66, 66); ewl_widget_show(shadow); + cell = ewl_cell_new(); + ewl_container_child_append(EWL_CONTAINER(shadow), cell); + ewl_object_minimum_size_set(EWL_OBJECT(cell), 50, 50); + ewl_object_maximum_size_set(EWL_OBJECT(cell), 50, 50); + ewl_theme_data_str_set(cell, "/cell/group", + ewl_theme_data_str_get(m->entry, "group")); + ewl_callback_append(cell, EWL_CALLBACK_CLICKED, change_image, current_image); + ewl_widget_show(cell); + image = ewl_image_thumbnail_new(); ewl_image_thumbnail_request(EWL_IMAGE_THUMBNAIL(image), current_image); - ewl_container_child_append(EWL_CONTAINER(shadow), image); + ewl_container_child_append(EWL_CONTAINER(cell), image); ewl_image_size_set(EWL_IMAGE(image), 48, 48); - ewl_theme_data_str_set(image, "/image_thumbnail/group", - ewl_theme_data_str_get(m->entry, "group")); - ewl_callback_append(image, EWL_CALLBACK_CLICKED, change_image, current_image); + ewl_image_proportional_set(EWL_IMAGE(image), TRUE); ewl_widget_show(image); ecore_dlist_next(view_thumbs); ------------------------------------------------------------------------- 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