Enlightenment CVS committal

Author  : moom
Project : e17
Module  : proto

Dir     : e17/proto/etk/src/lib


Modified Files:
        etk_combobox.c etk_combobox.h 


Log Message:
* [Theme] When you release a combobox button or a toggle button with the 
mouse out of the widget, it no longer looks pressed.
* [Combobox] The hidden items are no longer displayed in the combobox 
window


===================================================================
RCS file: /cvs/e/e17/proto/etk/src/lib/etk_combobox.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- etk_combobox.c      13 May 2006 23:44:40 -0000      1.11
+++ etk_combobox.c      14 May 2006 14:14:58 -0000      1.12
@@ -808,7 +808,8 @@
 static void _etk_combobox_window_size_request(Etk_Widget *widget, Etk_Size 
*size)
 {
    Etk_Combobox *combobox;
-   int i;
+   Evas_List *l;
+   int i, num_visible_items;
    
    if (!widget || !size)
       return;
@@ -819,7 +820,14 @@
    for (i = 0; i < combobox->num_cols; i++)
       size->w += combobox->cols[i]->size;
    
-   size->h = evas_list_count(combobox->items) * combobox->item_height;
+   num_visible_items = 0;
+   for (l = combobox->items; l; l = l->next)
+   {
+      if (etk_widget_is_visible(ETK_WIDGET(l->data)))
+         num_visible_items++;
+   }
+   
+   size->h = num_visible_items * combobox->item_height;
 }
 
 /* Resizes the combobox window to the allocated geometry */
@@ -834,8 +842,11 @@
    geometry.h = combobox->item_height;
    for (l = combobox->items; l; l = l->next)
    {
-      etk_widget_size_allocate(ETK_WIDGET(l->data), geometry);
-      geometry.y += combobox->item_height;
+      if (etk_widget_is_visible(ETK_WIDGET(l->data)))
+      {
+         etk_widget_size_allocate(ETK_WIDGET(l->data), geometry);
+         geometry.y += combobox->item_height;
+      }
    }
 }
 
@@ -910,8 +921,6 @@
       return;
    
    size->w = 0;
-   /* TODO: active_item_size_request: height */
-   /* size->h = combobox->item_height; */
    size->h = 0;
    for (i = 0; i < combobox->num_cols; i++)
    {
===================================================================
RCS file: /cvs/e/e17/proto/etk/src/lib/etk_combobox.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- etk_combobox.h      13 May 2006 23:44:40 -0000      1.8
+++ etk_combobox.h      14 May 2006 14:14:58 -0000      1.9
@@ -9,8 +9,6 @@
 
 /* TODO/FIXME list:
  * - Combobox item separator!
- * - Bug in the default theme: when you press the combobox button, and you 
release it with the mouse out of it,
- * the button looks pressed.
  */
 
 /**




-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to