entry: get indicator height for copypaste 13/108713/2
authorMinchul Lee <slotus.lee@samsung.com>
Thu, 5 Jan 2017 12:43:25 +0000 (21:43 +0900)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Fri, 6 Jan 2017 01:05:59 +0000 (17:05 -0800)
when ctxpopup is located on the top of the screen,
indicator bar is touched instead of ctxpopup.

Change-Id: Ibea22a192e17b7d06516057bb5a417c08360fed5
Signed-off-by: Minchul Lee <slotus.lee@samsung.com>
src/modules/copypasteUI_ctxpopup/copypaste.c

index 0fda844e34826092c511efa3cacb250544ade87e..18c392f4da987866db8b66d3eebf476b40e74f4d 100644 (file)
@@ -596,11 +596,26 @@ _ctxpopup_position(Evas_Object *obj EINA_UNUSED)
                {
                   if ((sx >= vx) && (shy < sy)) //case: start handler is upside
                     {
+                       const char *str;
+                       Evas_Coord ph;
+                       Evas_Coord indicator_h = 0;
+
+                       str = edje_object_data_get(elm_layout_edje_get(ext_mod->popup), "indicator_maxh");
+                       if (str)
+                         indicator_h = (int)(atoi(str)
+                                             * elm_config_scale_get()
+                                             * elm_object_scale_get(ext_mod->popup)
+                                             / edje_object_base_scale_get(elm_layout_edje_get(ext_mod->popup)));
+
+                       evas_object_geometry_get(ext_mod->popup, NULL, NULL, NULL, &ph);
+
                        y = shy;
                        w = x2 - x;
                        evas_object_move(ext_mod->popup, x + w/2, y);
                        GET_CTX_AVAI_DIR();
-                       if (dir != ELM_CTXPOPUP_DIRECTION_UP)
+
+                       if ((dir == ELM_CTXPOPUP_DIRECTION_UP && indicator_h > 0 && y < indicator_h + ph)
+                           || dir != ELM_CTXPOPUP_DIRECTION_UP)
                          {
                             y = sy - gap;
                          }