elementary/ctxpopup - patched by cnook <kimcinoo@gmail.com>
authorhermet <hermet@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 18 Jul 2011 05:07:36 +0000 (05:07 +0000)
committerhermet <hermet@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 18 Jul 2011 05:07:36 +0000 (05:07 +0000)
Hi All,

The ctxpopup arrow is attached on the drag-able part.
If arrow height/width is smaller than drag-able part,
then there is a gap between arrow and ctxpopup base.
So this patch comes for resolving this issue. Thanks.

Sincerely,
Shinwoo Kim.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@61462 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/elc_ctxpopup.c

index bba809f..f633437 100644 (file)
@@ -493,7 +493,7 @@ _update_arrow(Evas_Object *obj, Elm_Ctxpopup_Direction dir)
                 y = base_size.h - arrow_size.h;
               else
                 y = y - base_size.y - (arrow_size.h * 0.5);
-              edje_object_part_drag_value_set(wd->base, "elm.swallow.arrow_left", 0.5,
+              edje_object_part_drag_value_set(wd->base, "elm.swallow.arrow_left", 1,
                                               (double) (y) / (double) (base_size.h - arrow_size.h));
            }
          break;
@@ -507,7 +507,7 @@ _update_arrow(Evas_Object *obj, Elm_Ctxpopup_Direction dir)
               else if (y > (base_size.y + base_size.h - (arrow_size.h * 0.5)))
                 y = base_size.h - arrow_size.h;
               else y = y - base_size.y - (arrow_size.h * 0.5);
-              edje_object_part_drag_value_set(wd->base, "elm.swallow.arrow_right", 0.5,
+              edje_object_part_drag_value_set(wd->base, "elm.swallow.arrow_right", 0,
                                               (double) (y) / (double) (base_size.h - arrow_size.h));
             }
          break;
@@ -523,7 +523,7 @@ _update_arrow(Evas_Object *obj, Elm_Ctxpopup_Direction dir)
               else
                 x = x - base_size.x - (arrow_size.w * 0.5);
               edje_object_part_drag_value_set(wd->base, "elm.swallow.arrow_up",
-                                              (double) (x) / (double) (base_size.w - arrow_size.w), 0.5);
+                                              (double) (x) / (double) (base_size.w - arrow_size.w), 1);
            }
          break;
       case ELM_CTXPOPUP_DIRECTION_DOWN:
@@ -537,7 +537,7 @@ _update_arrow(Evas_Object *obj, Elm_Ctxpopup_Direction dir)
                 x = base_size.w - arrow_size.w;
               else x = x - base_size.x - (arrow_size.w * 0.5);
               edje_object_part_drag_value_set(wd->base, "elm.swallow.arrow_down",
-                                              (double) (x) / (double) (base_size.w - arrow_size.w), 0.5);
+                                              (double) (x) / (double) (base_size.w - arrow_size.w), 0);
            }
          break;
       default: