Reassigning values to an Arc's style


I am trying to reset an arcs style. Specifically line size, rounded and color.

Every option ends up with the same output
Before reset


What MCU/Processor/Board and compiler are you using?

PC Emulator

What do you want to achieve?

Reset the parameters based on new ones

What have you tried so far?

Here is the relevant code:

lv_style_t newStyle;
lv_style_copy(&newStyle, &lv_style_plain);

int lineWidth = std::atoi(lv_ta_get_text(>arcLineWidth));
newStyle.line.width = lineWidth; = 255;
newStyle.line.color = color;
if (lv_cb_is_checked(>arcLineRound))
  newStyle.line.rounded = true;
  newStyle.line.rounded = false;
lv_arc_set_style(>selectedObject, LV_ARC_STYLE_MAIN, &newStyle);

odata includes a pointer to the class, selectedObject is the arc I am trying to resize.

Code to reproduce

See above.

I am clearly doing this wrong.

Screenshot and/or video

If possible, add screenshots and/or videos about the current state.

I have also tried invalidating the object after, that doesnt change the outcome.

new_style should be static because only its pointer is saved.

Ahh, I should have looked at the code, I thought a copy was made.