Author: tom
Date: Thu Feb 19 08:27:54 2009
New Revision: 4311

URL: http://svn.slimdevices.com/jive?rev=4311&view=rev
Log:
Bug: N/A
Description:
Touch edge fixes:
- mouseInside does <= on low end - "0" for instance was being missed
- group "nearest object" check ignores 0 width objects from consideration.

Modified:
    7.4/trunk/squeezeplay/src/squeezeplay/share/jive/ui/Group.lua
    7.4/trunk/squeezeplay/src/squeezeplay/src/ui/jive_widget.c

Modified: 7.4/trunk/squeezeplay/src/squeezeplay/share/jive/ui/Group.lua
URL: 
http://svn.slimdevices.com/jive/7.4/trunk/squeezeplay/src/squeezeplay/share/jive/ui/Group.lua?rev=4311&r1=4310&r2=4311&view=diff
==============================================================================
--- 7.4/trunk/squeezeplay/src/squeezeplay/share/jive/ui/Group.lua (original)
+++ 7.4/trunk/squeezeplay/src/squeezeplay/share/jive/ui/Group.lua Thu Feb 19 
08:27:54 2009
@@ -103,16 +103,18 @@
                                        for _,widget in pairs(obj.widgets) do
                                                local widgetX, widgetY, 
widgetW, widgetH = widget:getBounds()
 
-                                               local widgetDistance
-                                               if mouseX >= widgetW + widgetX 
then
-                                                       widgetDistance = mouseX 
- (widgetW + widgetX)
-                                               else
-                                                       widgetDistance = 
widgetX - mouseX
-                                               end
-
-                                               if widgetDistance < 
closestDistance then
-                                                       closestDistance = 
widgetDistance
-                                                       closestWidget = widget
+                                               if widgetW > 0 then --widget 
must have some width to be considered
+                                                       local widgetDistance
+                                                       if mouseX >= widgetW + 
widgetX then
+                                                               widgetDistance 
= mouseX - (widgetW + widgetX)
+                                                       else
+                                                               widgetDistance 
= widgetX - mouseX
+                                                       end
+
+                                                       if widgetDistance < 
closestDistance then
+                                                               closestDistance 
= widgetDistance
+                                                               closestWidget = 
widget
+                                                       end
                                                end
                                        end
                                        if closestWidget then

Modified: 7.4/trunk/squeezeplay/src/squeezeplay/src/ui/jive_widget.c
URL: 
http://svn.slimdevices.com/jive/7.4/trunk/squeezeplay/src/squeezeplay/src/ui/jive_widget.c?rev=4311&r1=4310&r2=4311&view=diff
==============================================================================
--- 7.4/trunk/squeezeplay/src/squeezeplay/src/ui/jive_widget.c (original)
+++ 7.4/trunk/squeezeplay/src/squeezeplay/src/ui/jive_widget.c Thu Feb 19 
08:27:54 2009
@@ -205,8 +205,8 @@
                return 1;
        }
 
-       lua_pushboolean(L, peer->bounds.x < event->u.mouse.x && 
event->u.mouse.x < peer->bounds.x + peer->bounds.w &&
-                       peer->bounds.y < event->u.mouse.y && event->u.mouse.y < 
peer->bounds.y + peer->bounds.h);
+       lua_pushboolean(L, peer->bounds.x <= event->u.mouse.x && 
event->u.mouse.x < peer->bounds.x + peer->bounds.w &&
+                       peer->bounds.y <= event->u.mouse.y && event->u.mouse.y 
< peer->bounds.y + peer->bounds.h);
        return 1;
 }
 

_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/jive-checkins

Reply via email to