Enlightenment CVS committal

Author  : dj2
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_freebox.c 


Log Message:
- add a bit of padding (from the theme) around the items in the box

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_freebox.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- ewl_freebox.c       31 Dec 2005 07:13:53 -0000      1.3
+++ ewl_freebox.c       31 Dec 2005 07:21:10 -0000      1.4
@@ -241,12 +241,15 @@
 {
        Ewl_Container *c;
        Ewl_Widget *child;
-       int max_pos, max_h = 0, cur_y = 0, cur_x, base_x;
+       int max_pos, max_h = 0, cur_y = 0, cur_x, base_x, pad = 0;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("fb", fb);
        DCHECK_TYPE("fb", fb, "freebox");
 
+       pad = ewl_theme_data_int_get(EWL_WIDGET(fb),
+                                       "/freebox/auto/padding");
+
        base_x = ewl_object_current_x_get(EWL_OBJECT(fb));
        max_pos = base_x + ewl_object_current_w_get(EWL_OBJECT(fb));
 
@@ -267,7 +270,7 @@
                if ((cur_x + child_w) > max_pos)
                {
                        cur_x = base_x;
-                       cur_y += max_h;
+                       cur_y += max_h + pad;
                        max_h = 0;
                }
 
@@ -276,7 +279,7 @@
 
                ewl_object_place(EWL_OBJECT(child), cur_x, cur_y,
                                                child_w, child_h);
-               cur_x += child_w;
+               cur_x += child_w + pad;
        }
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to