Author: tom
Date: Wed Oct 15 19:48:51 2008
New Revision: 3144
URL: http://svn.slimdevices.com?rev=3144&root=Jive&view=rev
Log:
Bug: 9717
Description:
Temporary fix to improve slider drag stickiness. Now slider receives drag event
even when mouse is in list area. This still needs works since the slider
should receive darg events no matter where the mouse is in the app.
Modified:
7.3/trunk/squeezeplay/src/squeezeplay/share/jive/ui/Menu.lua
Modified: 7.3/trunk/squeezeplay/src/squeezeplay/share/jive/ui/Menu.lua
URL:
http://svn.slimdevices.com/7.3/trunk/squeezeplay/src/squeezeplay/share/jive/ui/Menu.lua?rev=3144&root=Jive&r1=3143&r2=3144&view=diff
==============================================================================
--- 7.3/trunk/squeezeplay/src/squeezeplay/share/jive/ui/Menu.lua (original)
+++ 7.3/trunk/squeezeplay/src/squeezeplay/share/jive/ui/Menu.lua Wed Oct 15
19:48:51 2008
@@ -65,6 +65,7 @@
local EVENT_FOCUS_LOST = jive.ui.EVENT_FOCUS_LOST
local EVENT_MOUSE_PRESS = jive.ui.EVENT_MOUSE_PRESS
local EVENT_MOUSE_DOWN = jive.ui.EVENT_MOUSE_DOWN
+local EVENT_MOUSE_UP = jive.ui.EVENT_MOUSE_UP
local EVENT_MOUSE_MOVE = jive.ui.EVENT_MOUSE_MOVE
local EVENT_MOUSE_DRAG = jive.ui.EVENT_MOUSE_DRAG
@@ -222,7 +223,13 @@
evtype == EVENT_MOUSE_MOVE or
evtype == EVENT_MOUSE_DRAG then
- if self.scrollbar:mouseInside(event) then
+ if self.scrollbar:mouseInside(event) or
self.sliderDragInProgress then
+ if (evtype ~= EVENT_MOUSE_MOVE) then
+ --allows slider drag to continue even when
listitem area is entered
+ -- a more comprehensive solution is needed so
that drag of a slider is respected no matter
+ -- where the mouse cursor is on the screen
+ self.sliderDragInProgress = true
+ end
-- forward event to scrollbar
return self.scrollbar:_event(event)
@@ -239,6 +246,10 @@
return EVENT_CONSUME
end
+
+ elseif evtype == EVENT_MOUSE_UP then
+ self.sliderDragInProgress = false
+ return EVENT_UNUSED
elseif evtype == EVENT_SHOW or
evtype == EVENT_HIDE then
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/cgi-bin/mailman/listinfo/jive-checkins