elm_map: fix copyright scalability issue 29/156329/3
authorSungtaek Hong <sth253.hong@samsung.com>
Wed, 5 Apr 2017 06:43:33 +0000 (15:43 +0900)
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>
Wed, 18 Oct 2017 09:58:01 +0000 (09:58 +0000)
 - Since copyright may have long text, the text cannot be shown properly
   in low resolution.

@tizen_fix

Change-Id: I063b386bf4ec2c4b8a1f29d7d3cbff6abed9802e
Signed-off-by: Sungtaek Hong <sth253.hong@samsung.com>
src/lib/elm_map.c

index be5b998..8bd926f 100644 (file)
@@ -266,6 +266,7 @@ _scale_cb(const Evas_Object *obj EINA_UNUSED,
 static Evas_Object *
 _osm_copyright_cb(Evas_Object *obj)
 {
+   /* TIZEN_ONLY(20170401): fix copyright scalability issue
    Evas_Object *label;
 
    label = elm_label_add(obj);
@@ -274,6 +275,15 @@ _osm_copyright_cb(Evas_Object *obj)
                        "</shadow_color></backing_color></backing></color>");
 
    return label;
+   */
+   ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
+   char buf[PATH_MAX];
+
+   snprintf(buf, sizeof(buf), "openstreetmap.org opendatacommons.org creativecommons.org");
+   edje_object_part_text_set(wd->resize_obj, "elm.text.copyright", buf);
+
+   return NULL;
+   /* END */
 }
 
 static const Source_Tile src_tiles[] =
@@ -3435,6 +3445,11 @@ _source_tile_set(Elm_Map_Data *sd,
      sd->zoom_min = sd->src_tile->zoom_min;
 
    ELM_SAFE_FREE(sd->copyright, evas_object_del);
+   /* TIZEN_ONLY(20170401): fix copyright scalability issue */
+   ELM_WIDGET_DATA_GET_OR_RETURN(sd->obj, wd);
+
+   edje_object_part_text_set(wd->resize_obj, "elm.text.copyright", NULL);
+   /* END */
    if (sd->src_tile->copyright_cb)
      {
         sd->copyright = sd->src_tile->copyright_cb(sd->obj);