Arc is wrong when copy from origin one in lvgl ver 7.10.1

Hi @kisvegabor

Description

I create an arc, and then copy this arc
But the size of origin-arc is different with copy-arc.

What LVGL version are you using?

LVGL ver 7.10.1

What do you want to achieve?

The size of origin-arc and copy-arc must be the same. The reason is the copy-arc is using all the styles of the origin-arc.
※ I haven’t checked if other attributes are different, just checked for size.

create arc

origin_arc = lv_arc_create(screen, NULL);

//Write style LV_ARC_PART_BG for origin_arc
lv_style_init(&s_style_origin_arc_bg);

//Write style state: LV_STATE_DEFAULT for s_style_origin_arc_bg
lv_style_set_bg_color(&s_style_origin_arc_bg, LV_STATE_DEFAULT, lv_color_make(0xff, 0xff, 0xff));
lv_style_set_bg_grad_color(&s_style_origin_arc_bg, LV_STATE_DEFAULT, lv_color_make(0xff, 0xff, 0xff));
lv_style_set_bg_grad_dir(&s_style_origin_arc_bg, LV_STATE_DEFAULT, LV_GRAD_DIR_VER);
lv_style_set_bg_opa(&s_style_origin_arc_bg, LV_STATE_DEFAULT, 0);
lv_style_set_border_width(&s_style_origin_arc_bg, LV_STATE_DEFAULT, 0);
lv_style_set_line_color(&s_style_origin_arc_bg, LV_STATE_DEFAULT, lv_color_make(0x05, 0x95, 0xf5));
lv_style_set_line_width(&s_style_origin_arc_bg, LV_STATE_DEFAULT, 12);
lv_obj_add_style(origin_arc, LV_ARC_PART_BG, &s_style_origin_arc_bg);

//Write style LV_ARC_PART_INDIC for origin_arc
lv_style_init(&s_style_origin_arc_indic);

//Write style state: LV_STATE_DEFAULT for s_style_origin_arc_indic
lv_style_set_line_color(&s_style_origin_arc_indic, LV_STATE_DEFAULT, lv_color_make(0xff, 0xf7, 0x05));
lv_style_set_line_width(&s_style_origin_arc_indic, LV_STATE_DEFAULT, 12);
lv_obj_add_style(origin_arc, LV_ARC_PART_INDIC, &s_style_origin_arc_indic);
lv_obj_set_pos(origin_arc, 35, 40);
lv_obj_set_size(origin_arc, 170, 170);
lv_arc_set_bg_angles(origin_arc, 356, 360);
lv_arc_set_angles(origin_arc, 120, 60);
lv_arc_set_rotation(origin_arc, 0);
lv_obj_set_style_local_pad_top(origin_arc, LV_ARC_PART_BG, LV_STATE_DEFAULT, 0);
lv_obj_set_style_local_pad_bottom(origin_arc, LV_ARC_PART_BG, LV_STATE_DEFAULT, 0);
lv_obj_set_style_local_pad_left(origin_arc, LV_ARC_PART_BG, LV_STATE_DEFAULT, 0);
lv_obj_set_style_local_pad_right(origin_arc, LV_ARC_PART_BG, LV_STATE_DEFAULT, 0);
lv_obj_set_style_local_line_rounded(origin_arc, LV_ARC_PART_INDIC, LV_STATE_DEFAULT, 0);

copy arc

copy_arc = lv_arc_create(screen, origin_arc);

Hi,

It works well for me with the latest v7 version. Could you try with that? (release/v7 branch)