Enlightenment CVS committal Author : dj2 Project : e17 Module : libs/ewl
Dir : e17/libs/ewl/src/lib Modified Files: ewl_button.c ewl_button.h Log Message: - center the stock icon along with the label =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_button.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -3 -r1.10 -r1.11 --- ewl_button.c 10 Oct 2005 23:42:20 -0000 1.10 +++ ewl_button.c 11 Oct 2005 20:53:51 -0000 1.11 @@ -75,10 +75,19 @@ } ewl_button_stock_type_set(b, EWL_STOCK_NONE); - ewl_box_orientation_set(EWL_BOX(b), EWL_ORIENTATION_HORIZONTAL); + ewl_box_orientation_set(EWL_BOX(b), EWL_ORIENTATION_VERTICAL); ewl_widget_appearance_set(w, "button"); ewl_widget_inherit(w, "button"); + b->body = ewl_hbox_new(); + ewl_container_child_append(EWL_CONTAINER(b), b->body); + ewl_object_alignment_set(EWL_OBJECT(b->body), EWL_FLAG_ALIGN_CENTER); + ewl_object_fill_policy_set(EWL_OBJECT(b->body), EWL_FLAG_FILL_NONE); + ewl_widget_internal_set(b->body, TRUE); + ewl_widget_show(b->body); + + ewl_container_redirect_set(EWL_CONTAINER(b), EWL_CONTAINER(b->body)); + DRETURN_INT(TRUE, DLEVEL_STABLE); } @@ -105,11 +114,8 @@ else if (!b->label_object) { b->label_object = ewl_label_new(); ewl_label_text_set(EWL_LABEL(b->label_object), l); - ewl_object_fill_policy_set(EWL_OBJECT(b->label_object), - EWL_FLAG_FILL_FILL); - ewl_object_alignment_set(EWL_OBJECT(b->label_object), - EWL_FLAG_ALIGN_CENTER); ewl_container_child_append(EWL_CONTAINER(b), b->label_object); + ewl_widget_internal_set(b->label_object, TRUE); ewl_widget_show(b->label_object); } else =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_button.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- ewl_button.h 10 Oct 2005 15:27:10 -0000 1.4 +++ ewl_button.h 11 Oct 2005 20:53:51 -0000 1.5 @@ -36,6 +36,7 @@ struct Ewl_Button { Ewl_Box box; /**< Inherit from the box for adding widgets */ + Ewl_Widget *body; Ewl_Widget *label_object; /**< Labels are common, make it easy */ Ewl_Widget *image_object; /**< Add an image to the button if needed */ Ewl_Stock_Type stock_type; /**< The stock type of the button */ ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs