Enlightenment CVS committal Author : pfritz Project : e17 Module : libs/ewl
Dir : e17/libs/ewl/src/lib Modified Files: ewl_scrollpane.c Log Message: code cosmetic: reoder widgets creation =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_scrollpane.c,v retrieving revision 1.36 retrieving revision 1.37 diff -u -3 -r1.36 -r1.37 --- ewl_scrollpane.c 11 Feb 2008 22:00:02 -0000 1.36 +++ ewl_scrollpane.c 20 Feb 2008 13:54:26 -0000 1.37 @@ -119,6 +119,9 @@ s->overlay = ewl_overlay_new(); ewl_object_fill_policy_set(EWL_OBJECT(s->overlay), EWL_FLAG_FILL_ALL); + ewl_container_child_append(EWL_CONTAINER(s), s->overlay); + ewl_widget_internal_set(s->overlay, TRUE); + ewl_widget_show(s->overlay); /* * Create the container to hold the contents and it's configure @@ -126,31 +129,25 @@ */ s->box = ewl_vbox_new(); ewl_object_fill_policy_set(EWL_OBJECT(s->box), EWL_FLAG_FILL_FILL); + ewl_container_child_append(EWL_CONTAINER(s->overlay), s->box); + ewl_widget_internal_set(s->box, TRUE); + ewl_widget_show(s->box); /* * Create the scrollbars for the scrollpane. */ s->hscrollbar = ewl_hscrollbar_new(); - s->vscrollbar = ewl_vscrollbar_new(); - - /* - * Add the parts to the scrollpane - */ - ewl_container_child_append(EWL_CONTAINER(s), s->overlay); - ewl_container_child_append(EWL_CONTAINER(s->overlay), s->box); ewl_container_child_append(EWL_CONTAINER(s), s->hscrollbar); - ewl_container_child_append(EWL_CONTAINER(s), s->vscrollbar); - - ewl_widget_internal_set(s->overlay, TRUE); - ewl_widget_internal_set(s->box, TRUE); ewl_widget_internal_set(s->hscrollbar, TRUE); - ewl_widget_internal_set(s->vscrollbar, TRUE); - - ewl_widget_show(s->overlay); - ewl_widget_show(s->box); ewl_widget_show(s->hscrollbar); + + s->vscrollbar = ewl_vscrollbar_new(); + ewl_widget_internal_set(s->vscrollbar, TRUE); + ewl_container_child_append(EWL_CONTAINER(s), s->vscrollbar); ewl_widget_show(s->vscrollbar); + /* after we added our internal widgets we can redirect the + * scrollpane to the content box */ ewl_container_redirect_set(EWL_CONTAINER(s), EWL_CONTAINER(s->box)); /* ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs