Author: titmuss
Date: Mon Apr 28 06:15:45 2008
New Revision: 2376
URL: http://svn.slimdevices.com?rev=2376&root=Jive&view=rev
Log:
Bug: N/A
Description:
Make mouse behaviour in Menus better.
Modified:
7.2/trunk/squeezeplay/src/squeezeplay/share/jive/ui/Menu.lua
Modified: 7.2/trunk/squeezeplay/src/squeezeplay/share/jive/ui/Menu.lua
URL:
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay/share/jive/ui/Menu.lua?rev=2376&root=Jive&r1=2375&r2=2376&view=diff
==============================================================================
--- 7.2/trunk/squeezeplay/src/squeezeplay/share/jive/ui/Menu.lua (original)
+++ 7.2/trunk/squeezeplay/src/squeezeplay/share/jive/ui/Menu.lua Mon Apr 28
06:15:45 2008
@@ -222,6 +222,10 @@
local i = y / self.itemHeight --(h / self.numWidgets)
self:setSelectedIndex(self.topItem + math.floor(i))
+
+ if evtype == EVENT_MOUSE_DRAG then
+ _scrollList(self)
+ end
return EVENT_CONSUME
end
@@ -605,6 +609,7 @@
self:playSound("CLICK")
self.selected = selected
+ _scrollList(self)
self:reLayout()
end
end
@@ -651,7 +656,11 @@
function _updateWidgets(self)
-- update the list to keep the selection in view
- _scrollList(self)
+ local selected = _coerce(self.selected or 1, self.listSize)
+ if selected < self.topItem
+ or selected >= self.topItem + self.numWidgets then
+ _scrollList(self)
+ end
local indexSize = self.numWidgets
local min = self.topItem
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/cgi-bin/mailman/listinfo/jive-checkins