slider: fix slider for tizen 3.0 GUI guide. 48/90548/3
authorHosang Kim <hosang12.kim@samsung.com>
Fri, 30 Sep 2016 12:02:22 +0000 (21:02 +0900)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Thu, 13 Oct 2016 03:32:41 +0000 (20:32 -0700)
- deleted unnecessary vector objects.
- change slider indicator initial value.

Signed-off-by: Hosang Kim <hosang12.kim@samsung.com>
Change-Id: Ib05f483e2d3f362294bed5ab280327bd27022d76

src/lib/elm_slider.c
src/lib/tizen_vector.c

index 4f0d8f5..5553354 100644 (file)
@@ -856,7 +856,7 @@ _elm_slider_evas_object_smart_add(Eo *obj, Elm_Slider_Data *priv)
    elm_widget_sub_object_parent_add(obj);
 
    priv->horizontal = EINA_TRUE;
-   priv->indicator_show = EINA_TRUE;
+   priv->indicator_show = EINA_FALSE;
    priv->indicator_visible_mode = elm_config_slider_indicator_visible_mode_get();
    priv->val_max = 1.0;
    priv->step = SLIDER_STEP;
index eafb158..7b449ea 100644 (file)
@@ -2144,8 +2144,6 @@ static int slider_level = 1;
 static int slider_level2 = 2;
 static int slider_level_rest = 3;
 static int slider_center = 4;
-static int slider_handle = 5;
-static int slider_handle_pressed = 6;
 
 static void
 slider_del_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj,
@@ -2175,37 +2173,6 @@ _append_round_rect(Efl_VG *shape, int w, int h)
 }
 
 static void
-slider_vg_handle_normal_resize_cb(void *data , Evas *e EINA_UNUSED,
-                                  Evas_Object *obj EINA_UNUSED,
-                                  void *event_info EINA_UNUSED)
-{
-   Evas_Coord w, h;
-   vg_slider *vd = data;
-   evas_object_geometry_get(vd->vg[slider_handle], NULL, NULL, &w, &h);
-   _append_circle(vd->shape[slider_handle], w/2, h/2, w/2);
-}
-
-static void
-slider_vg_handle_pressed_resize_cb(void *data , Evas *e EINA_UNUSED,
-                            Evas_Object *obj EINA_UNUSED,
-                            void *event_info EINA_UNUSED)
-{
-   Evas_Coord w, h;
-   vg_slider *vd = data;
-   evas_object_geometry_get(vd->vg[slider_handle_pressed], NULL, NULL, &w, &h);
-   if (w == h)
-     _append_circle(vd->shape[slider_handle_pressed], w/2, h/2, w/2);
-   else
-     {
-        if (elm_slider_indicator_show_get(vd->obj) &&
-            elm_slider_indicator_format_get(vd->obj))
-          _append_round_rect(vd->shape[slider_handle_pressed], w, h);
-        else
-          _append_circle(vd->shape[slider_handle_pressed], w/2, h - w/2, w/2);
-     }
-}
-
-static void
 slider_base_resize_cb(void *data , Evas *e EINA_UNUSED,
                             Evas_Object *obj EINA_UNUSED,
                             void *event_info EINA_UNUSED)
@@ -2278,7 +2245,7 @@ _slider_create_handle(vg_slider *vd)
    Efl_VG *root;
    int i;
    Evas *e = evas_object_evas_get(vd->obj);
-   for(i=0; i < 7; i++)
+   for(i=0; i < 5; i++)
      {
         vd->vg[i] = evas_object_vg_add(e);
         root = evas_object_vg_root_node_get(vd->vg[i]);
@@ -2310,18 +2277,6 @@ _slider_create_handle(vg_slider *vd)
    evas_object_event_callback_add(vd->vg[slider_center], EVAS_CALLBACK_RESIZE,
                                   slider_center_resize_cb, vd);
    elm_object_part_content_set(vd->obj, "elm.swallow.tizen_vg_shape5", vd->vg[slider_center]);
-
-   // slider handle
-   evas_object_event_callback_add(vd->vg[slider_handle], EVAS_CALLBACK_RESIZE,
-                                  slider_vg_handle_normal_resize_cb, vd);
-   evas_object_event_callback_add(vd->vg[slider_handle_pressed], EVAS_CALLBACK_RESIZE,
-                                  slider_vg_handle_pressed_resize_cb, vd);
-   elm_object_part_content_set(vd->obj, "elm.dragable.slider:elm.swallow.tizen_vg_shape1", vd->vg[slider_handle]);
-   if (vd->popup)
-     {
-        edje_object_part_swallow(vd->popup, "elm.swallow.tizen_vg_shape2", vd->vg[slider_handle_pressed]);
-        elm_widget_sub_object_add(vd->obj, vd->vg[slider_handle_pressed]);
-     }
 }
 
 void