How to inherit a style

I recently updated a project from lvgl v8 to v9.3 (and now v9.4), which has gone smoothly for the most part. The only difference I haven’t been able to figure out is how to mark a style property as “inheritable”.

I had this in v8:

-       lv_style_set_prop_meta(style, s->prop, LV_STYLE_PROP_META_INHERIT);

which I was using to mark button text in the checked state the same colour as when it was in the unchecked state.

What do you want to achieve?

I would like to know what the right way to mark properties as inheritable is in v9.4.

What have you tried so far?

The doco for inheritance in 9.3 and 9.4 appears to be gutted (Styles Overview - LVGL 9.4 documentation). The API described in older versions of the doco referred to the v8 API, which is no longer available.

I tried reading the style code but couldn’t find a setter for the style prop flags.

Environment

  • MCU/MPU/Board: Not sure it matters, but it’s OpenBSD running on a PC with a touch screen.
  • LVGL version: v9.4