Enlightenment CVS committal

Author  : rbdpngn
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/test


Modified Files:
        ewl_box_test.c ewl_imenu_test.c 


Log Message:
Some minor tweaks to the layout model. Basing container sizes on the minimum
sizes of their contents and allowing for fill policies to do their jobs seems
to give cleaner results.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/test/ewl_box_test.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -3 -r1.19 -r1.20
--- ewl_box_test.c      1 May 2003 03:53:08 -0000       1.19
+++ ewl_box_test.c      3 Jun 2003 04:00:55 -0000       1.20
@@ -19,12 +19,6 @@
 }
 
 void
-__toggle_child_fill_configure(Ewl_Widget * w, void *ev_data, void *user_data)
-{
-       printf("Configuring Fill child\n");
-}
-
-void
 __toggle_child_fill(Ewl_Widget * w, void *ev_data, void *user_data)
 {
        Ewl_Fill_Policy f;
@@ -55,7 +49,7 @@
                ewl_button_set_label(EWL_BUTTON(w),
                                     "Shrink This Box To Fit It's Parent");
                ewl_object_set_fill_policy(EWL_OBJECT(w),
-                                          EWL_FILL_POLICY_SHRINK);
+                                          EWL_FILL_POLICY_HSHRINK);
        } else {
                ewl_button_set_label(EWL_BUTTON(w),
                                     "Don't shrink this box at all");
@@ -210,8 +204,6 @@
        /****************************************************************/
        vbox[1] = ewl_vbox_new();
        ewl_container_append_child(EWL_CONTAINER(hbox[0]), vbox[1]);
-       ewl_callback_prepend(vbox[1], EWL_CALLBACK_CONFIGURE,
-                           __toggle_child_fill_configure, NULL);
        ewl_widget_show(vbox[1]);
 
        /*
@@ -312,6 +304,8 @@
 
        hbox[2] = ewl_hbox_new();
        ewl_container_append_child(EWL_CONTAINER(box_box), hbox[2]);
+       ewl_object_set_fill_policy(EWL_OBJECT(hbox[2]),
+                       EWL_FILL_POLICY_HSHRINK);
        ewl_widget_show(hbox[2]);
 
        /*
@@ -320,7 +314,7 @@
        hbox_button[1][0] =
                ewl_button_new("Shrink This Box To Fit It's Parent");
        ewl_object_set_fill_policy(EWL_OBJECT(hbox_button[1][0]),
-                                  EWL_FILL_POLICY_SHRINK);
+                                  EWL_FILL_POLICY_HSHRINK);
        ewl_container_append_child(EWL_CONTAINER(hbox[2]), hbox_button[1][0]);
        ewl_callback_append(hbox_button[1][0], EWL_CALLBACK_CLICKED,
                            __toggle_child_shrink, NULL);
@@ -332,7 +326,7 @@
        hbox_button[1][1] =
                ewl_button_new("Shrink This Box To Fit It's Parent");
        ewl_object_set_fill_policy(EWL_OBJECT(hbox_button[1][1]),
-                                  EWL_FILL_POLICY_SHRINK);
+                                  EWL_FILL_POLICY_HSHRINK);
        ewl_container_append_child(EWL_CONTAINER(hbox[2]), hbox_button[1][1]);
        ewl_callback_append(hbox_button[1][1], EWL_CALLBACK_CLICKED,
                            __toggle_child_shrink, NULL);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/test/ewl_imenu_test.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- ewl_imenu_test.c    18 Apr 2003 20:35:43 -0000      1.5
+++ ewl_imenu_test.c    3 Jun 2003 04:00:56 -0000       1.6
@@ -100,6 +100,8 @@
         */
        imenu2 = ewl_imenu_new(NULL, "Sub menu");
        ewl_container_append_child(EWL_CONTAINER(imenu1), imenu2);
+       ewl_callback_append(imenu2, EWL_CALLBACK_CONFIGURE,
+                           __imenu_configure, NULL);
        ewl_widget_show(imenu2);
 
        item = ewl_menu_item_new(NULL, "button");




-------------------------------------------------------
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to