Enlightenment CVS committal

Author  : handyande
Project : misc
Module  : engage

Dir     : misc/engage/src/module


Modified Files:
        e_mod_main.c e_mod_main.h 


Log Message:
stop moving base icons while we select a sub icon
===================================================================
RCS file: /cvsroot/enlightenment/misc/engage/src/module/e_mod_main.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -3 -r1.15 -r1.16
--- e_mod_main.c        2 Mar 2005 23:05:08 -0000       1.15
+++ e_mod_main.c        3 Mar 2005 13:47:50 -0000       1.16
@@ -444,6 +444,7 @@
 
    eb->x = eb->y = eb->w = eb->h = -1;
    eb->zoom = 1.0;
+   eb->mouse_out = -1;
 
    evas_event_freeze(eb->evas);
    o = edje_object_add(eb->evas);
@@ -1162,7 +1163,7 @@
 static void
 _engage_bar_motion_handle(Engage_Bar *eb, Evas_Coord mx, Evas_Coord my)
 {
-   Evas_Coord x, y, w, h, md, xx, yy, app_size;
+   Evas_Coord x, y, w, h, md, md2, xx, yy, app_size;
    double relx, rely, left, right, dummy;
    Evas_List *items, *extras;
    int bordersize, counter;
@@ -1195,11 +1196,13 @@
    if (edge == E_GADMAN_EDGE_LEFT || edge == E_GADMAN_EDGE_RIGHT)
      {
        md = my;
+       md2 = mx;
        counter = y;
      }
    else
      {
        md = mx;
+       md2 = my;
        counter = x;
      }
    app_size = eb->engage->iconbordersize / 1.5;
@@ -1211,10 +1214,21 @@
        int          do_zoom;
 
        icon = (Engage_Icon *) items->data;
-       distance = (double) (counter - md) / (eb->engage->iconbordersize);
+       if (eb->mouse_out != -1)
+         distance = (double) (counter - eb->mouse_out) / 
(eb->engage->iconbordersize);
+       else
+         distance = (double) (counter - md) / (eb->engage->iconbordersize);
 
        do_zoom = zoom_function(distance, &new_zoom, &relative, eb);
        size = icon->scale * new_zoom * eb->engage->iconbordersize;
+       if (md2 > size)
+         {
+            if (eb->mouse_out == -1)
+              eb->mouse_out = md;
+         }
+       else
+         eb->mouse_out = -1;
+                              
        evas_object_image_fill_set(icon->icon_object, 0.0, 0.0, size, size);
        evas_object_resize(icon->bg_object, size, size);
        xx = x;
===================================================================
RCS file: /cvsroot/enlightenment/misc/engage/src/module/e_mod_main.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- e_mod_main.h        2 Mar 2005 14:41:00 -0000       1.4
+++ e_mod_main.h        3 Mar 2005 13:47:50 -0000       1.5
@@ -49,6 +49,7 @@
    Evas_Object *bar_object;
    Evas_Object *box_object;
    Evas_Object *event_object;
+   Evas_Coord   mouse_out;
    
    Evas_List   *icons;
    




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to