Author: richard
Date: Thu Feb 19 11:31:32 2009
New Revision: 4313

URL: http://svn.slimdevices.com/jive?rev=4313&view=rev
Log:
 r4...@harrypotter (orig r4311):  tom | 2009-02-19 16:27:54 +0000
 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/branches/pango/   (props changed)
    7.4/branches/pango/squeezeplay/src/squeezeplay/share/jive/ui/Group.lua
    7.4/branches/pango/squeezeplay/src/squeezeplay/src/ui/jive_widget.c

Propchange: 7.4/branches/pango/
------------------------------------------------------------------------------
--- svk:merge (original)
+++ svk:merge Thu Feb 19 11:31:32 2009
@@ -4,7 +4,7 @@
 bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.2/trunk:2921
 bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.3/private-branches/jive-refresh:3653
 bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.3/trunk:4138
-bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.4/trunk:4306
+bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.4/trunk:4311
 bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/7.0:2013
 bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/SN:1083
 bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/scrolling:1378

Modified: 7.4/branches/pango/squeezeplay/src/squeezeplay/share/jive/ui/Group.lua
URL: 
http://svn.slimdevices.com/jive/7.4/branches/pango/squeezeplay/src/squeezeplay/share/jive/ui/Group.lua?rev=4313&r1=4312&r2=4313&view=diff
==============================================================================
--- 7.4/branches/pango/squeezeplay/src/squeezeplay/share/jive/ui/Group.lua 
(original)
+++ 7.4/branches/pango/squeezeplay/src/squeezeplay/share/jive/ui/Group.lua Thu 
Feb 19 11:31:32 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/branches/pango/squeezeplay/src/squeezeplay/src/ui/jive_widget.c
URL: 
http://svn.slimdevices.com/jive/7.4/branches/pango/squeezeplay/src/squeezeplay/src/ui/jive_widget.c?rev=4313&r1=4312&r2=4313&view=diff
==============================================================================
--- 7.4/branches/pango/squeezeplay/src/squeezeplay/src/ui/jive_widget.c 
(original)
+++ 7.4/branches/pango/squeezeplay/src/squeezeplay/src/ui/jive_widget.c Thu Feb 
19 11:31:32 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