Enlightenment CVS committal
Author : ningerso
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src/lib
Modified Files:
ewl_seeker.c
Log Message:
Adjust seeker/scrollbar behavior to follow the mouse more closely.
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_seeker.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -3 -r1.15 -r1.16
--- ewl_seeker.c 20 Apr 2006 04:09:51 -0000 1.15
+++ ewl_seeker.c 8 May 2006 03:19:34 -0000 1.16
@@ -552,9 +552,9 @@
ewl_object_current_geometry_get(EWL_OBJECT(w), &xx, &yy, &ww, &hh);
if (s->orientation == EWL_ORIENTATION_HORIZONTAL)
- s->dragstart = ev->x - xx;
+ s->dragstart = ev->x - (xx + ((ww + 1) / 2));
else
- s->dragstart = ev->y - yy;
+ s->dragstart = ev->y - (yy + ((hh + 1) / 2));
DLEAVE_FUNCTION(DLEVEL_STABLE);
}
@@ -756,6 +756,14 @@
adjust = ewl_object_current_h_get(EWL_OBJECT(s->button));
}
+ /*
+ * Adjust mouse position based on drag starting point.
+ */
+ m -= s->dragstart;
+
+ /*
+ * Adjust the scale to align on the center of the drag bar.
+ */
dg -= adjust;
adjust /= 2;
dc += adjust;
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs