elementary/ctxpopup
authorhermet <hermet@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 16 Dec 2011 05:15:32 +0000 (05:15 +0000)
committerhermet <hermet@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 16 Dec 2011 05:15:32 +0000 (05:15 +0000)
Sure, I have separated the path.
The attached patch is for the using previous result which is calculated by
the _calc_base_geometry();
Thanks always.. Please review this patch first. I will send second one
based on the attached.

Sincerely,
Shinwoo Kim.

Signed-Off-By: Kim Shinwoo <kimcinoo.efl@gmail.com>
Signed-Off-By: ChunEon Park <hermet@hermet.pe.kr>
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@66267 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/elc_ctxpopup.c

index fa57ab2..983bb33 100644 (file)
@@ -64,7 +64,7 @@ static void _adjust_pos_y(Evas_Coord_Point *pos,
                           Evas_Coord_Rectangle *hover_area);
 static Elm_Ctxpopup_Direction _calc_base_geometry(Evas_Object *obj,
                                                   Evas_Coord_Rectangle *rect);
-static void _update_arrow(Evas_Object *obj, Elm_Ctxpopup_Direction dir);
+static void _update_arrow(Evas_Object *obj, Elm_Ctxpopup_Direction dir, Evas_Coord_Rectangle rect);
 static void _sizing_eval(Evas_Object *obj);
 static void _shift_base_by_arrow(Evas_Object *arrow,
                                  Elm_Ctxpopup_Direction dir,
@@ -504,11 +504,10 @@ _calc_base_geometry(Evas_Object *obj, Evas_Coord_Rectangle *rect)
 }
 
 static void
-_update_arrow(Evas_Object *obj, Elm_Ctxpopup_Direction dir)
+_update_arrow(Evas_Object *obj, Elm_Ctxpopup_Direction dir, Evas_Coord_Rectangle base_size)
 {
    Evas_Coord x, y;
    Evas_Coord_Rectangle arrow_size;
-   Evas_Coord_Rectangle base_size;
    Widget_Data *wd;
    double drag;
 
@@ -518,8 +517,6 @@ _update_arrow(Evas_Object *obj, Elm_Ctxpopup_Direction dir)
    evas_object_geometry_get(obj, &x, &y, NULL, NULL);
    evas_object_geometry_get(wd->arrow, NULL, NULL, &arrow_size.w,
                             &arrow_size.h);
-   evas_object_geometry_get(wd->base, &base_size.x, &base_size.y,
-                            &base_size.w, &base_size.h);
 
    edje_object_part_unswallow(wd->base, wd->arrow);
 
@@ -677,7 +674,7 @@ _sizing_eval(Evas_Object *obj)
    //Base
    wd->dir = _calc_base_geometry(obj, &rect);
    _show_signal_emit(obj, wd->dir);
-   _update_arrow(obj, wd->dir);
+   _update_arrow(obj, wd->dir, rect);
    _shift_base_by_arrow(wd->arrow, wd->dir, &rect);
 
    //resize scroller according to final size.