Languages

Menu
Sites
Language
EEXT cicrle progressbar adds second one

Hi, I have a problem. I tried using eefl circle progressbar from ui components code. It works, but on gear fit there is second circle. It seems that it's some kind of leftover from circular ui (at least I think so). Or maybe the second circle is the background of progressbar. Anyone know how I can get rid of it?

 

EDIT: this is definetly background - how I can change it's properties to be same as progresbarr itself?

 

EDC code:

collections {
   base_scale: 1.0;
   group {
      name: "progres_bar";
      parts{
         part { name: "base";
            type: SPACER;
            scale: 1;
            description { state: "default" 0.0;
               min: 360 360;
               max: 360 360;
               fixed: 1 1;
            }
         }
         part { name: "elm.swallow.bg";
            type: SWALLOW;
            scale: 1;
            description { state: "default" 0.0;
               color: 255 255 255 0;
            }
         }
         part { name: "elm.swallow.content";
            type: SWALLOW;
            scale: 1;
            description { state: "default" 0.0;
               rel1.to: "base";
               rel2.to: "base";
            }
         }
         part { name: "elm.text.progressbar1";
            type: TEXT;
            scale: 1;
            description { state: "default" 0.0;
               fixed: 1 1;
               rel1.to: "base";
               rel2.to: "base";
               rel1.relative: 0.5 0.5;
               rel2.relative: 0.5 0.5;
               text {
                  font: "Tizen:style=Regular";
                  size: 50;
                  min: 1 1;
               }
               color: 255 255 255 255;
            }
         }
      }
   }
}

Adding component code:

    /* adding progres bar */
    Evas_Object *spacer1 = evas_object_rectangle_add(evas_object_evas_get(content));
    evas_object_size_hint_min_set(spacer1, 0, 100);
    evas_object_color_set(spacer1, 0, 0, 0, 0);
    elm_box_pack_end(content, spacer1);

    layout = elm_layout_add(content);
    elm_layout_file_set(layout, ELM_DEMO_EDJ, "progres_bar");

    progressbar = eext_circle_object_progressbar_add(layout, NULL);
    elm_object_part_content_set(layout, "elm.swallow.content", progressbar);

    /*
       Set the circle object's properties.
        - circle object's value has a range from 0.0 to 100.0
        - Circle object has a shape of Red(R: 255, G:0, B: 0, A: 0)
        and 15-width circle line with radius of 70
    */
    eext_circle_object_value_min_max_set(progressbar, 0.0, 100.0);
    eext_circle_object_radius_set(progressbar, 90);
    eext_circle_object_color_set(progressbar, 255, 0, 0, 255);
    eext_circle_object_line_width_set(progressbar, 10);
    evas_object_show(layout);
    elm_box_pack_end(content, layout);

    Evas_Object *spacer2 = evas_object_rectangle_add(evas_object_evas_get(content));
    evas_object_size_hint_min_set(spacer2, 0, 80);
    evas_object_color_set(spacer2, 0, 0, 0, 0);
    elm_box_pack_end(content, spacer2);

    timer = ecore_timer_add(1, timer_tick, NULL);
    /* end of adding progres bar */

 

Edited by: Jakub Wiśniewski on 14 Feb, 2017
View Selected Answer

Responses

1 Replies
Mark as answer
Jakub Wiśniewski

Ok i added 2nd swallow object to edc file and used 

eext_circle_object_add 

instead of  

eext_circle_object_progressbar_add