Enlightenment CVS committal

Author  : rbdpngn
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_seeker.c 


Log Message:
Fix drag button placement on seekers/scrollbars based on size accepted.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_seeker.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- ewl_seeker.c        12 Jan 2006 18:21:19 -0000      1.12
+++ ewl_seeker.c        18 Jan 2006 06:47:55 -0000      1.13
@@ -461,6 +461,7 @@
        double s1, s2;
        int dx, dy;
        int dw, dh;
+       int nw, nh;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("w", w);
@@ -493,14 +494,27 @@
 
        if (s->orientation == EWL_ORIENTATION_VERTICAL) {
                dh *= s1;
-               dy += (CURRENT_H(s) - dh) * s2;
        }
        else {
                dw *= s1;
-               dx += (CURRENT_W(s) - dw) * s2;
        }
 
-       ewl_object_geometry_request(EWL_OBJECT(s->button), dx, dy, dw, dh);
+       ewl_object_size_request(EWL_OBJECT(s->button), dw, dh);
+
+       /*
+        * Get the resulting geometry to reposition the button appropriately.
+        */
+       nw = ewl_object_current_w_get(EWL_OBJECT(s->button));
+       nh = ewl_object_current_h_get(EWL_OBJECT(s->button));
+
+       if (s->orientation == EWL_ORIENTATION_VERTICAL) {
+               dy += (CURRENT_H(s) - nh) * s2;
+       }
+       else {
+               dx += (CURRENT_W(s) - nw) * s2;
+       }
+
+       ewl_object_place(EWL_OBJECT(s->button), dx, dy, nw, nh);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to