discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=c648ae40483cc626d6e1128dbcd291337cb44d1a

commit c648ae40483cc626d6e1128dbcd291337cb44d1a
Author: Mike Blumenkrantz <[email protected]>
Date:   Fri Jul 28 13:49:31 2017 -0400

    make gadget resize anchoring able to omit axes
    
    when grabbing e.g., the top center of a gadget, it feels better to just
    have that resize perform vertical adjustments instead of also allowing
    horizontal changes
---
 src/bin/e_gadget.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/bin/e_gadget.c b/src/bin/e_gadget.c
index a2f9b43bc..33ad3decb 100644
--- a/src/bin/e_gadget.c
+++ b/src/bin/e_gadget.c
@@ -938,13 +938,13 @@ _gadget_act_resize(E_Object *obj, const char *params 
EINA_UNUSED, E_Binding_Even
    zgc = evas_object_data_get(g, "__e_gadget");
    if (zgc->site->orient) return EINA_FALSE;
    evas_object_geometry_get(g, &x, &y, &w, &h);
-   if (ev->canvas.x < x + (w / 2))
+   if (ev->canvas.x < x + (w / 3))
      zgc->resizing = E_GADGET_SITE_ANCHOR_LEFT;
-   else
+   else if (ev->canvas.x > x + (w * 2 / 3))
      zgc->resizing = E_GADGET_SITE_ANCHOR_RIGHT;
-   if (ev->canvas.y < y + (h / 2))
+   if (ev->canvas.y < y + (h / 3))
      zgc->resizing |= E_GADGET_SITE_ANCHOR_TOP;
-   else
+   else if (ev->canvas.y > y + (h * 2 / 3))
      zgc->resizing |= E_GADGET_SITE_ANCHOR_BOTTOM;
    if (!zgc->site->move_handler)
      zgc->site->move_handler = ecore_event_handler_add(ECORE_EVENT_MOUSE_MOVE, 
(Ecore_Event_Handler_Cb)_gadget_mouse_resize, zgc);

-- 


Reply via email to