Enlightenment CVS committal

Author  : lordchaos
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_iconbox.c 


Log Message:
* Few layout and visual glitch fixes

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_iconbox.c,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -3 -r1.91 -r1.92
--- ewl_iconbox.c       9 Dec 2005 10:39:45 -0000       1.91
+++ ewl_iconbox.c       10 Dec 2005 05:43:24 -0000      1.92
@@ -4,6 +4,10 @@
 #include "ewl_private.h"
 
 #define ICON_LABEL_INITIAL 80
+#define ICONBOX_SELECT_LAYER 600
+#define ICONBOX_ICON_LAYER 500
+#define ICONBOX_BACKGROUND_LAYER 500
+#define ICONBOX_ENTRY_LAYER 1000
 
 
 int
@@ -324,7 +328,7 @@
        ewl_container_child_append(EWL_CONTAINER(ib->ewl_iconbox_pane_inner), 
ib->select_floater);
        
        ewl_object_custom_size_set(EWL_OBJECT(ib->select), 1, 1);
-       ewl_widget_layer_set(EWL_WIDGET(ib->select_floater), 1);
+       ewl_widget_layer_set(EWL_WIDGET(ib->select_floater), 
ICONBOX_SELECT_LAYER);
        ewl_widget_color_set(EWL_WIDGET(ib->select), 255, 255, 25, 50);
        ib->drag_box = 0;
 
@@ -476,10 +480,29 @@
        if (!ib->background) 
                ib->background = ewl_image_new();
        
-       ewl_object_custom_size_set(EWL_OBJECT(ib->background), w,h);
        ewl_image_file_set(EWL_IMAGE(ib->background), file,0);
        ewl_container_child_append(EWL_CONTAINER(ib->ewl_iconbox_pane_inner), 
ib->background);
+
+       if (EWL_WIDGET(ib)->parent) {
+               int width,height;
+               int sw = 
CURRENT_W(EWL_SCROLLPANE(ib->ewl_iconbox_scrollpane)->vscrollbar);
+               int sh = 
CURRENT_H(EWL_SCROLLPANE(ib->ewl_iconbox_scrollpane)->hscrollbar);
+               
+               
+               Ewl_Widget* parent = EWL_WIDGET(ib)->parent;
+               width = CURRENT_W(ib);
+               height = CURRENT_H(ib);
+               ewl_object_position_request(EWL_OBJECT(ib->background),
+                               CURRENT_X(parent), CURRENT_Y(parent));
+               ewl_object_custom_size_set(EWL_OBJECT(ib->background), width-sw,
+                               height-sh);
+       }
+       
+       
        ewl_widget_show(ib->background);
+       ewl_widget_layer_set(EWL_WIDGET(ib->background), 
ICONBOX_BACKGROUND_LAYER);
+       
+       ewl_widget_configure(EWL_WIDGET(ib));
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
@@ -726,7 +749,7 @@
                
                ewl_widget_show(EWL_WIDGET(ib->icon_box_parent->entry_floater));
                
ewl_floater_position_set(EWL_FLOATER(ib->icon_box_parent->entry_floater), 
x,y+ih);
-               
ewl_widget_layer_set(EWL_WIDGET(ib->icon_box_parent->entry_floater), 1000);
+               
ewl_widget_layer_set(EWL_WIDGET(ib->icon_box_parent->entry_floater), 
ICONBOX_ENTRY_LAYER);
                ewl_widget_focus_send(EWL_WIDGET(ib->icon_box_parent->entry));
                //ewl_widget_hide(ib->w_label);
 
@@ -896,6 +919,9 @@
        /* Add this icon to the icon list */
        ecore_list_append(iconbox->ewl_iconbox_icon_list, ib);
 
+
+       ewl_widget_layer_set(EWL_WIDGET(ib), ICONBOX_ICON_LAYER);
+
        return EWL_ICONBOX_ICON(ib);
 }
 
@@ -1255,14 +1281,21 @@
 
        if (ib->background) {
                int width,height;
+               int sw = 
CURRENT_W(EWL_SCROLLPANE(ib->ewl_iconbox_scrollpane)->vscrollbar);
+               int sh = 
CURRENT_H(EWL_SCROLLPANE(ib->ewl_iconbox_scrollpane)->hscrollbar);
+               
                Ewl_Widget* parent = w->parent;
                width = CURRENT_W(ib);
                height = CURRENT_H(ib);
                ewl_object_position_request(EWL_OBJECT(ib->background),
                                CURRENT_X(parent), CURRENT_Y(parent));
-               ewl_object_custom_size_set(EWL_OBJECT(ib->background), width,
-                               height);
+               ewl_object_custom_size_set(EWL_OBJECT(ib->background), width-sw,
+                               height-sh);
+
+               ewl_widget_layer_set(EWL_WIDGET(ib->background), 
ICONBOX_BACKGROUND_LAYER);
        }
 
+       
+
        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
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to